Repository navigation
feat(node): Add onSpanEnd to httpIntegration - #25581
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cc344a9. Configure here.
size-limit report 📦Compared: 600f303 (PR test merge using develop at 87babff) Against: b3e0c9e (develop) · base run #63030
|
45ebb10 to
1f0fc7f
Compare
1f0fc7f to
4e495ab
Compare
4e495ab to
35530ea
Compare
35530ea to
81d2783
Compare
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 failing, 49 successful. See the run.
Successful checks
|
81d2783 to
68acd48
Compare
68acd48 to
7adc4ce
Compare
7adc4ce to
be699cb
Compare
`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>
0e45807 to
c709b57
Compare

httpIntegrationtakesonSpanCreatedfor incoming requests, but notonSpanEnd. 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'snode:httpserver code already supportsonSpanEnd, anddenoHttpIntegrationandbunHttpServerIntegrationpass it through.httpServerSpansIntegrationnow acceptsonSpanEndand calls it as core does: when the response finishes, after the SDK sets the response attributes and the span status, before the span ends.httpIntegrationpasses it through. The sharedServerRequestOptionscheck for Node now lists no unsupported options.Fixes #25572
Fixes JS-3970