feat: add open telemetry instrumentation (#2786)
This commit adds some useful automatic instrumentation for when users are using `--unstable-otel`: - Fresh renames the span for incoming HTTP requests to `$METHOD $ROUTE` and the `http.route` attribute is added. - Fresh creates a span around FS route handlers, showing whether they returned a response or data. - Fresh creates a span around async components, showing how long they took to execute. - Fresh adds a span around preact rendering, showing how long rendering takes. - Fresh adds a span around static file serving, showing how long it took and whether there were requests without a cache bust key. We can improve this in the future with more telemetry, such as metrics.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
"@std/media-types": "jsr:@std/media-types@1",
|
||||
"@std/path": "jsr:@std/path@1",
|
||||
"@std/semver": "jsr:@std/semver@1",
|
||||
"@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
|
||||
"autoprefixer": "npm:autoprefixer@10.4.17",
|
||||
"cssnano": "npm:cssnano@6.0.3",
|
||||
"esbuild": "npm:esbuild@0.23.1",
|
||||
|
||||
Reference in New Issue
Block a user