Uh oh!
There was an error while loading. Please reload this page.
feat(core): HTTP server diagnostics channel utility - #20779
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
size-limit report 📦
|
f1ac205 to
2954cdcCompareUh oh!
There was an error while loading. Please reload this page.
JPeer264
left a comment
There was a problem hiding this comment.
Got couple of comments. Nice splitting.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
2954cdc to
ccd0275CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ccd0275 to
c74cb0aCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
JPeer264
left a comment
There was a problem hiding this comment.
LGTM. The PR got way smaller now as well 🥳
c74cb0a to
1c4fb59CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1c4fb59 to
7ef4b27CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Add platform-portable building blocks that server SDKs use to instrument incoming HTTP requests without depending on OTel HTTP instrumentation: - `getHttpServerSubscriptions`: diagnostics_channel listener for `http.server.request.start`, set up isolation scope, request data, trace continuation, optional body capture and request-session tracking - if `spans: true` option set, then also creates the root server span around the request lifecycle, applying static-asset/status-code filtering, `ignoreIncomingRequests` and `onSpanCreated` hooks - `recordRequestSession`: release-health session aggregation per request - `patchRequestToCaptureBody`: opt-in incoming request body capture Add `kind` field on `StartSpanOptions` so OTel-based SDKs can set SpanKind on the underlying span, and update `headersToDict` to allow `number`-valued headers to support Node.js types.
Replace inline `instrumentServer` Proxy/emit-wrapping implementation in node-light's HTTP integration with core's `getHttpServerSubscriptions`, which does the same work (isolation scope, request data, body capture, trace continuation, best-effort transaction name).
Replace inline `instrumentServer` Proxy/emit-wrapping in `httpServerIntegration.ts` with core's `getHttpServerSubscriptions`. OTel-specific concerns (header propagation, double-wrap context guard, `_startSpanCallback` dispatch) move into a `wrapServerEmitRequest` callback that `instrumentServer` invokes inside the per-request lifecycle. Re-export `recordRequestSession` from core so existing test continues to pass. Duplicate request-isolation/session/body-capture plumbing removed, logic now lives in `@sentry/core`'s subscription factory.
`patchRequestToCaptureBody` lives in `@sentry/core` now and both the light SDK and the OTel-based `httpServerIntegration` consume it from there.
7ef4b27 to
b92be48CompareThere 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 b92be48. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).Closes #issue_link_here