Repository navigation
fix(v10/node): Guard user callbacks in the node:http server instrumentation - #25701
nicohrubec wants to merge 2 commits into
Conversation
…entation Backport of: #25592 Co-Authored-By: GPT-6 <codex@openai.com>
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 bb8af13. Configure here.
| onSpanEnd: () => { | ||
| throw new Error('onSpanEnd error'); | ||
| }, | ||
| }), |
There was a problem hiding this comment.
Tests use wrong callback option names
Medium Severity
The Deno regression passes onSpanEnd to denoHttpIntegration, but v10 exposes that hook as onIncomingSpanEnd, so the throwing callback never runs and the test would pass without the fix. The Node fixture has the same mismatch with onSpanCreated versus incomingRequestSpanHook. Flagged because the review rules require fix tests to exercise the new behavior.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit bb8af13. Configure here.
size-limit report 📦
|


Backport of: #25592
Differences to the original PR
packages/node-coreand retained v10's RPC metadata and request-body defaults.safeCallbackhelper and its five tests because v10 does not have that prerequisite. Omitted its unrelatedCALLBACK_ERRORsentinel.requestHook,responseHook, andapplyCustomAttributesOnSpancallbacks, which were removed on v11. The Node integration fixture exercises those hooks alongside the current callbacks.traceLifecycleunset and assert v10's default transaction envelopes; the original Node regression asserted v11 streamed span containers. Existing tests and default tracing behavior are preserved.Fixes #25590
All 18 callback/helper unit tests and both new CJS/ESM integration regressions pass. The full HTTP integration suite passes 22/24; the same two ESM route-attribute failures reproduce against unchanged v10 HTTP sources. Formatting and scoped lint pass; repository-wide lint/build have unrelated baseline/type failures. Deno tests were not run because Deno is unavailable locally.