You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit be699cb
Browse filesBrowse the repository at this point in the historyBrowse files
`httpIntegration` takes `onSpanCreated` for incoming requests, but not
`onSpanEnd`. A user could not change the server span based on the
response, for example to rename it from data that is only known when
the response finishes. Core's `node:http` server code already supports
`onSpanEnd`, and `denoHttpIntegration` and `bunHttpServerIntegration`
pass it through.
`httpServerSpansIntegration` now accepts `onSpanEnd` and calls it as
core does: when the response finishes, after the SDK sets the response
attributes and the span status, before the span ends. `httpIntegration`
passes it through. The shared `ServerRequestOptions` check for Node now
lists no unsupported options.
Fixes#25572
Fixes JS-3970
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,10 @@ Work in this release was contributed by @adityareddy-dev, @jpdefo, @Jxxunnn, @ph
59
59
60
60
`ignoreStaticAssets` defaults to `true`, so `Bun.serve` no longer creates spans for `GET` requests to common static assets such as `favicon.ico`, `robots.txt` or `*.js` files. To keep these spans, set `bunServerIntegration({ ignoreStaticAssets: false })`. `Bun.serve` spans also follow the client's tracing configuration by default, so the integration does not start spans when tracing is disabled. Errors thrown for `OPTIONS` and `HEAD` requests are now captured.
61
61
62
+
- **feat(node): Add `onSpanEnd` to `httpIntegration`**
63
+
64
+
`httpIntegration` and `httpServerSpansIntegration` now accept `onSpanEnd`, a hook that runs when the response for an incoming request finishes, before its span ends. Use it to change the span based on the response. Deno and Bun already have this option.
0 commit comments