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 9fbbd60
Browse filesBrowse the repository at this point in the historyBrowse files
Public option names now match httpServerIntegration / httpServerSpansIntegration. Nested instrumentation hooks are first-class outgoing hooks instead of a leftover OTEL-era nest.
Fixes#22255
Copy file name to clipboardExpand all lines: dev-packages/node-integration-tests/suites/express/with-http/maxIncomingRequestBodySize/instrument-always.mjs
Copy file name to clipboardExpand all lines: dev-packages/node-integration-tests/suites/express/with-http/maxIncomingRequestBodySize/instrument-medium.mjs
Copy file name to clipboardExpand all lines: dev-packages/node-integration-tests/suites/express/with-http/maxIncomingRequestBodySize/instrument-none.mjs
Copy file name to clipboardExpand all lines: dev-packages/node-integration-tests/suites/express/with-http/maxIncomingRequestBodySize/instrument-small.mjs
Copy file name to clipboardExpand all lines: docs/migration/v11-end-state.md
+51-6Lines changed: 51 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -520,11 +520,11 @@ Two consequences to be aware of when upgrading:
520
520
- **Issue grouping:** Grouping in Sentry differs for events with and without stack traces, so you may see new issue groups after upgrading.
521
521
- **Release health:** Events with a stack trace are counted as errors, so a `captureMessage` call (including messages emitted by `captureConsoleIntegration`) now marks the current session as _errored_. This affects errored-session counts but does **not** mark sessions as crashed, so crash-free session rate is unaffected. If you use `captureMessage` for purely informational output, consider using Sentry Logs instead, which is better suited and does not affect release health.
522
522
523
-
### Incoming HTTP span hooks moved to `incomingRequestSpanHook`
523
+
### Incoming HTTP span hooks moved to `onSpanCreated`
524
524
525
525
Affected SDKs: `@sentry/node` and dependents.
526
526
527
-
The deprecated `httpIntegration` / `httpServerSpansIntegration` hooks `instrumentation.requestHook`, `instrumentation.responseHook`, and `instrumentation.applyCustomAttributesOnSpan` no longer run for incoming request spans. Use `incomingRequestSpanHook` (on `httpIntegration`) or `onSpanCreated` (on `httpServerSpansIntegration`) instead:
527
+
The deprecated `httpIntegration` / `httpServerSpansIntegration` hooks `instrumentation.requestHook`, `instrumentation.responseHook`, and `instrumentation.applyCustomAttributesOnSpan` no longer run for incoming request spans. Use `onSpanCreated` instead. Outgoing request spans use `outgoingRequestHook`, `outgoingResponseHook`, and `outgoingRequestApplyCustomAttributes`.
528
528
529
529
```js
530
530
// before
@@ -538,14 +538,12 @@ Sentry.httpIntegration({
538
538
539
539
// after
540
540
Sentry.httpIntegration({
541
-
incomingRequestSpanHook: (span, req, res) => {
541
+
onSpanCreated: (span, req, res) => {
542
542
span.setAttribute('custom', true);
543
543
},
544
544
});
545
545
```
546
546
547
-
`httpIntegration`'s `instrumentation` option is still honored for **outgoing** request spans.
548
-
549
547
### Deno `node:http` server requests are tracked as sessions
550
548
551
549
Affected SDKs: `@sentry/deno`.
@@ -951,7 +949,54 @@ The `idleTimeout`, `finalTimeout` and `childSpanTimeout` options of interaction
951
949
- (Express) The deprecated `patchExpressModule(options)` signature was removed. Use `patchExpressModule(moduleExports, getOptions)` instead.
952
950
- The `@sentry/node-core/light/otlp` entry point was removed, along with its optional `@opentelemetry/exporter-trace-otlp-http` peer dependency. `otlpIntegration` is now exported directly from every server-side SDK, so `Sentry.otlpIntegration()` needs no extra import or install.
953
951
- The `otlpIntegration` options `setupOtlpTracesExporter` and `collectorUrl` were removed, and the integration no longer sets up a span exporter, span processor, or tracer provider. Configure your own exporter and point it at `Sentry.getOtlpTracesEndpoint(dsn)`, or at your collector's URL if you route through one. See [Connecting Sentry to your OpenTelemetry traces](#connecting-sentry-to-your-opentelemetry-traces).
954
-
- The deprecated `httpServerSpansIntegration``instrumentation.{requestHook,responseHook,applyCustomAttributesOnSpan}` option was removed. Use `onSpanCreated`, or `httpIntegration({ incomingRequestSpanHook })`, to mutate incoming request spans.
952
+
- The deprecated `httpServerSpansIntegration``instrumentation.{requestHook,responseHook,applyCustomAttributesOnSpan}` option was removed. Use `onSpanCreated` to mutate incoming request spans, or `outgoingRequestHook` / `outgoingResponseHook` / `outgoingRequestApplyCustomAttributes` for outgoing request spans.
953
+
954
+
#### `httpIntegration` options were consolidated
955
+
956
+
`httpIntegration` option names now match `httpServerIntegration` / `httpServerSpansIntegration` and the other server SDKs. The deprecated `instrumentation` hooks were removed.
0 commit comments