Uh oh!
There was an error while loading. Please reload this page.
feat(server-utils): Migrate @opentelemetry/instrumentation-graphql to orchestrion - #21885
Conversation
chargome
commented
Jul 1, 2026
bugbot run |
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.
chargome
commented
Jul 1, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
chargome
commented
Jul 2, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
size-limit report 📦
|
chargome
commented
Jul 2, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
chargome
commented
Jul 2, 2026
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 43d4510. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
0eccdf9 to
d2c7ce0Compare…to orchestrion Rewrite the graphql integration as a diagnostics-channel subscriber, with orchestrion injecting channels into graphql's compiled `parse`/`validate`/`execute` (v14–v16). Registers `graphqlIntegration` in the channelIntegrations registry and adds a per-lib config file, so the opt-in and `diagnosticsChannelInjectionIntegrations()` pick it up automatically. Span names/attributes/origin mirror the OTel integration (distinct `auto.graphql.orchestrion.graphql` origin); the structural graphql types are shared with the vendored OTel instrumentation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d2c7ce0 to
21acce6Compare…phql # Conflicts: # packages/server-utils/src/orchestrion/index.ts
…er conventions develop landed a native diagnostics_channel graphql subscriber (v17) with new span conventions (graphql.document, WEB_SERVER_GRAPHQL_SPAN_OP op, auto.graphql.diagnostic_channel origin). Rework the orchestrion v14–16 subscriber to reuse that module's utils/conventions so spans are identical across versions, and compose the registry entry as native(v17) + orchestrion(v14–16) via extendIntegration so opting into injection instruments every supported version without the OTel patcher (no v17 regression). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…phql # Conflicts: # packages/server-utils/src/orchestrion/channels.ts # packages/server-utils/src/orchestrion/config/index.ts
…phql # Conflicts: # packages/server-utils/src/orchestrion/channels.ts # packages/server-utils/src/orchestrion/config/index.ts # packages/server-utils/src/orchestrion/index.ts
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.
andreiborza
left a comment
There was a problem hiding this comment.
LGTM, thanks for taking care of this!
…c-context logic (#22099) Removes the ioredis unit test that stubbed the SDK's async context strategy to drive spans, which replicated SDK internals in the test layer. Per the review thread in #21885, we rely on the integration tests instead. The orchestrion path is covered by the `redis` (ioredis scenario) and `redis-cache` node integration suites. The `responseHook` and connect-span cases aren't cleanly testable on the orchestrion path (the hook is wired internally for caching) and these suites are Docker-gated, so they're left as a possible follow-up rather than migrated now. Ref: #21885 (comment) Co-authored-by: Opus 4.8 <noreply@anthropic.com>
…nc-context logic (#22101) Removes the mongoose unit test that stubbed the SDK's async context strategy to drive spans, which replicated SDK internals in the test layer. Per the review thread in #21885, we rely on the integration tests instead. The path is covered by the `mongoose-tracing-channel` node integration suite. To avoid losing the useful unit-only assertions, this PR also adds error-status, empty-filter, and cursor-batchSize coverage to that suite. Ref: #21885 (comment) --------- Co-authored-by: Opus 4.8 <noreply@anthropic.com>
…-context logic (#22098) Follow-up to the review discussion in #21885: several `server-utils` diagnostics-channel unit tests stub the SDK's async context strategy (`setAsyncContextStrategy` plus a hand-rolled `installTestAsyncContextStrategy`) to drive spans, replicating SDK internals in the test layer. Per the thread, we're removing these in favor of the integration tests that exercise the real code paths. This PR removes both redis unit tests: - `test/integrations/tracing-channel/redis.test.ts` (orchestrion path, origin `auto.db.orchestrion.redis`) — covered by `suites/tracing/redis` (the suite branches on `isOrchestrionEnabled()`). - `test/redis/redis-dc-subscriber.test.ts` (native diagnostics-channel subscriber, origin `auto.db.redis.diagnostic_channel`) — covered by `suites/tracing/redis-dc`. Ref: #21885 (comment) Co-authored-by: Opus 4.8 <noreply@anthropic.com>
…async-context logic (#22097) Removes the postgres.js unit test that stubbed the SDK's async context strategy to drive spans, which replicated SDK internals in the test layer. Per the review thread in #21885, we rely on the integration tests instead. The orchestrion path is already covered end to end by the `postgresjs` node integration suite. The remaining unit-only assertions checked internal implementation details (not re-creating a span on a re-entrant call, skipping an already-wrapped query, no span without an active parent) rather than the spans a user actually sees, so there was nothing meaningful to move into an integration test. Ref: #21885 (comment) Co-authored-by: Opus 4.8 <noreply@anthropic.com>
…nc-context logic (#22103) Removes the three graphql subscriber unit tests and their shared helper, which stubbed the SDK's async context strategy and a fake document to drive spans, replicating SDK internals in the test layer. Per the review thread in #21885, we rely on the integration tests instead. The path is covered by the `graphql-tracing-channel` node integration suite. To avoid losing the useful unit-only assertions, this PR also adds validation-error status and `ignoreTrivialResolveSpans` coverage to that suite. The subscription-channel case is left as a possible follow-up. Ref: #21885 (comment) --------- Co-authored-by: Opus 4.8 <noreply@anthropic.com>
…ontext logic (#22100) Removes the hapi unit test that stubbed the SDK's async context strategy to drive spans, which replicated SDK internals in the test layer. Per the review thread in #21885, we rely on the integration tests instead. The orchestrion path is covered by the `hapi` node integration suite. `hapi-utils.test.ts` stays (pure metadata formatting, no async-context stubbing). The remaining unit-only assertions checked internal implementation details (setup only wrapping once when called twice, no span without an active span, accepting the ext handler as a tuple or an object) rather than the spans a user actually sees, so there was nothing meaningful to move into an integration test. Ref: #21885 (comment) Co-authored-by: Opus 4.8 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
…22141) Rewrites the `Firebase` integration off `InstrumentationBase` to an orchestrion diagnostics-channel listener in `@sentry/server-utils`, following the mysql ([#20900](<#20900>)) and graphql (#21885) migrations. The channel-based integration reuses the OTel `Firebase` name, so opting in via `experimentalUseDiagnosticsChannelInjection()` swaps it in 1:1 for the OTel one (which stays the default). **Firestore** — subscribes to `orchestrion:@firebase/firestore:{add,get,set,delete}-doc` (injected into firestore's lite `addDoc`/`getDocs`/`setDoc`/`deleteDoc`) and emits the same `db.query` client spans via `bindTracingChannelToSpan`, with a distinct `auto.firebase.orchestrion.firestore` origin. **firebase-functions** — the `onX(...)` provider functions *register* a handler and return synchronously, so the span can't be bound to the registration call. Instead the channel `start` subscriber rewraps the handler argument (orchestrion forwards the mutated args array to the real call), so the returned cloud function opens a `SERVER` span + error boundary on invocation, with `auto.firebase.orchestrion.functions` origin. The `node-firebase` e2e firestore suite additionally runs with `E2E_ORCHESTRION=true` to assert the orchestrion origin. Closes#20919 --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Nicolas Hrubec <nico.hrubec@sentry.io>
Migrates
@opentelemetry/instrumentation-graphqlto orchestrion diagnostics-channel injection.The channel based integration subscibes to
orchestrion:graphql:{parse,validate,execute}and emits the same spans as the OTel integration — with a distinctauto.graphql.orchestrion.graphqlorigin.closes#20752