Uh oh!
There was an error while loading. Please reload this page.
fix(server-utils): Ensure all orchestrion instrumentation lazy registers - #22387
fix(server-utils): Ensure all orchestrion instrumentation lazy registers#22387mydea wants to merge 2 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
size-limit report 📦
|
d3bf68e to
8e918d3CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
timfish
left a comment
There was a problem hiding this comment.
I can't find where invokeOrchestrionInstrumentation is defined 🤔
mydea
commented
Jul 21, 2026
This is in the other PR in this stack: #22386 |
8e918d3 to
03b2355CompareThere was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 03b2355. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
03b2355 to
93dba1aCompareUh oh!
There was an error while loading. Please reload this page.
| functionQuery: { expressionName: 'query', kind: 'Auto' }, | ||
| }, | ||
| ] satisfies InstrumentationConfig[]; | ||
| ] as const satisfies InstrumentationConfig[]; |
There was a problem hiding this comment.
q: Why was this cast necessary everywhere?
isaacs
commented
Jul 27, 2026
Superseded by #22518. |
…ers (#22518) This ports and refactors the intent of #22387, using the mechanisms landed on `develop` in #22094, rather than the mechanisms in #22386 which are similar in intent, but substantially different in implementation. The difference from #22387 is entirely in the plumbing underneath the helper. The way that "is my module injected?" and "tell me when it gets injected" are answered, both now use the machinery that already landed. Beyond that, the actual registration, event emitting, double-wrap guard, and integration refactoring, should all look very familiar. --------- Co-authored-by: Francesco Novy <francesco.novy@sentry.io> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Jan Peer Stöcklmair <jan.peer@sentry.io>

Migrates all orchestrion tracing-channel integrations to the
invokeOrchestrionInstrumentationhelper so that every integration lazily registers its channel subscribers only once the corresponding module is actually injected, rather than registering eagerly atSentry.init().Previously each integration wired up its own diagnostics-channel subscription directly, which meant subscribers could be registered before (or without) the target module ever being loaded, and the timing was inconsistent across integrations. Routing everything through the shared helper makes the behavior uniform: subscribers are set up for build-time-injected modules immediately and for runtime-injected modules when injection happens, always before the module publishes, and never more than once.
Alongside the migration, several integrations (hapi, graphql, kafkajs) are restructured into a
<name>/index.ts+<name>/instrumentation.tslayout to match the existing convention and keep the instrumentation wiring separate from the integration definition.Stacked on top of #22386 (ensure injected modules can reliably be picked up).