diff --git a/src/references/sdks/nestjs/index.md b/src/references/sdks/nestjs/index.md index bad57c88..3d7729db 100644 --- a/src/references/sdks/nestjs/index.md +++ b/src/references/sdks/nestjs/index.md @@ -642,6 +642,7 @@ If a frontend exists without Sentry, suggest the matching skill: | `SentryGlobalFilter` (unified) | 8.40.0 | | `Sentry.logger` API (`enableLogs`) | 9.41.0 | | `profileSessionSampleRate` | 10.27.0 | +| `experimentalUseDiagnosticsChannelInjection()` (experimental orchestrion instrumentation) | 10.66.0 | | Node.js requirement | ≥ 18 | | Node.js for ESM `--import` | ≥ 18.19.0 | | NestJS compatibility | 8.x – 11.x | diff --git a/src/references/sdks/nestjs/tracing.md b/src/references/sdks/nestjs/tracing.md index e3b8ac5a..352d5d13 100644 --- a/src/references/sdks/nestjs/tracing.md +++ b/src/references/sdks/nestjs/tracing.md @@ -33,6 +33,32 @@ Sentry is the OpenTelemetry provider — any OTel instrumentation automatically flows into Sentry. +### Experimental: orchestrion (diagnostics-channel) instrumentation + +SDK ≥ 10.66.0 ships an experimental alternative to the OTel-based `nestIntegration`: a +diagnostics-channel-based instrumentation path ("orchestrion"). Opt in by calling +`Sentry.experimentalUseDiagnosticsChannelInjection()` **before** `Sentry.init()`: + +```typescript +// instrument.ts +import * as Sentry from "@sentry/nestjs"; + +Sentry.experimentalUseDiagnosticsChannelInjection(); + +Sentry.init({ + dsn: "YOUR_DSN", + tracesSampleRate: 1.0, +}); +``` + +- Produces the same span tree as the OTel path (`app_creation`, `request_context`, `handler`, + `middleware.nestjs[.guard|.pipe|.interceptor|.exception_filter]`, `@OnEvent`/`@Cron` spans) — + only the span `origin` changes (e.g. `auto.http.otel.nestjs` → `auto.http.orchestrion.nestjs`). +- No bundler/build step required for plain Node apps; the function installs Node diagnostics-channel + module hooks at runtime. +- **Experimental** — may change or be removed in any release. Do not recommend by default; only + mention if a user is explicitly investigating orchestrion/diagnostics-channel instrumentation. + ## Code Examples ### Enable tracing