ref(node)!: Remove @opentelemetry/instrumentation dependency - #22843
Conversation
|
batman begin |
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 5681acc. Configure here.
size-limit report 📦
|
| // All options below do not do anything anymore in this instrumentation, and will be removed in the future. | ||
| // They are only kept here for backwards compatibility - the respective functionality is now handled by the httpServerIntegration/httpServerSpansIntegration. |
There was a problem hiding this comment.
We have tracking issues for these, I just removed the unnecessary InstrumentationConfig from here.
c89c176 to
94f3362
Compare
There 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.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 94f3362. Configure here.
5158f25 to
882fce1
Compare
`@sentry/node` was the last package holding `@opentelemetry/instrumentation`. All instrumentation is now channel-based via orchestrion, so the surface this dependency backed is dead or a no-op: - `generateInstrumentOnce` (and the framework re-exports) had no call sites. - `ensureIsWrapped`'s shimmer-based check can no longer detect channel-based express/koa/hapi, so its warning and the `missing_instrumentation` context were removed, along with the `disableInstrumentationWarnings` option and the `MissingInstrumentationContext` type. - The `@sentry/node/import` ESM hook now only registers the orchestrion diagnostics-channel injection; the legacy iitm `@sentry/node/loader` entry was removed. Adds the `makeOrchestrionLoader` rollup util (import-only, delegates to `@sentry/server-utils/orchestrion/import-hook`). The legacy `makeOtelLoaders` util is kept temporarily so the framework SDKs still build until they migrate in the following PRs. Co-Authored-By: Claude Opus 4.8 <[email protected]>
882fce1 to
3d28150
Compare
| forwarded-parse "2.1.2" | ||
|
|
||
| "@opentelemetry/[email protected]", "@opentelemetry/instrumentation@^0.220.0": | ||
| "@opentelemetry/[email protected]": |
There was a problem hiding this comment.
Only remaining usage of this is from the integration tests. We will probably remove this with #21116
## What Part of the `@opentelemetry/instrumentation` removal stack (based on #22843). - Switch `@sentry/astro`'s `./import` loader from the legacy `makeOtelLoaders` build util to `makeOrchestrionLoader`, so the generated `import-hook.mjs` imports `@sentry/server-utils/orchestrion/import-hook` directly. - Drop the obsolete `./loader` export (the iitm `--loader` entry, unused on Node >= 20.19). ## Why Orchestrion is the only instrumentation path now, so the framework's `--import` hook should register it directly instead of the removed iitm loader. `--loader` no longer applies (minimum Node is 20.19.0) and orchestrion has no `--loader` equivalent, so the `./loader` export is dead. --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
…22862) ## What Part of the `@opentelemetry/instrumentation` removal stack (based on #22843). - Switch `@sentry/aws-serverless`'s `./import` loader from the legacy `makeOtelLoaders` build util to `makeOrchestrionLoader`, so the generated `import-hook.mjs` imports `@sentry/server-utils/orchestrion/import-hook` directly. - Drop the obsolete `./loader` export (the iitm `--loader` entry, unused on Node >= 20.19). ## Why Orchestrion is the only instrumentation path now, so the framework's `--import` hook should register it directly instead of the removed iitm loader. `--loader` no longer applies (minimum Node is 20.19.0) and orchestrion has no `--loader` equivalent, so the `./loader` export is dead.
…Loader (#22863) ## What Part of the `@opentelemetry/instrumentation` removal stack (based on #22843). - Switch `@sentry/google-cloud-serverless`'s `./import` loader from the legacy `makeOtelLoaders` build util to `makeOrchestrionLoader`, so the generated `import-hook.mjs` imports `@sentry/server-utils/orchestrion/import-hook` directly. - Drop the obsolete `./loader` export (the iitm `--loader` entry, unused on Node >= 20.19). ## Why Orchestrion is the only instrumentation path now, so the framework's `--import` hook should register it directly instead of the removed iitm loader. `--loader` no longer applies (minimum Node is 20.19.0) and orchestrion has no `--loader` equivalent, so the `./loader` export is dead.
## What Part of the `@opentelemetry/instrumentation` removal stack (based on #22843). - Switch `@sentry/nextjs`'s `./import` loader from the legacy `makeOtelLoaders` build util to `makeOrchestrionLoader`, so the generated `import-hook.mjs` imports `@sentry/server-utils/orchestrion/import-hook` directly. - Drop the obsolete `./loader` export (the iitm `--loader` entry, unused on Node >= 20.19). ## Why Orchestrion is the only instrumentation path now, so the framework's `--import` hook should register it directly instead of the removed iitm loader. `--loader` no longer applies (minimum Node is 20.19.0) and orchestrion has no `--loader` equivalent, so the `./loader` export is dead.
## What Part of the `@opentelemetry/instrumentation` removal stack (based on #22843). - Switch `@sentry/remix`'s `./import` loader from the legacy `makeOtelLoaders` build util to `makeOrchestrionLoader`, so the generated `import-hook.mjs` imports `@sentry/server-utils/orchestrion/import-hook` directly. - Drop the obsolete `./loader` export (the iitm `--loader` entry, unused on Node >= 20.19). ## Why Orchestrion is the only instrumentation path now, so the framework's `--import` hook should register it directly instead of the removed iitm loader. `--loader` no longer applies (minimum Node is 20.19.0) and orchestrion has no `--loader` equivalent, so the `./loader` export is dead.
…er (#22866) ## What Part of the `@opentelemetry/instrumentation` removal stack (based on #22843). - Switch `@sentry/tanstackstart-react`'s `./import` loader from the legacy `makeOtelLoaders` build util to `makeOrchestrionLoader`, so the generated `import-hook.mjs` imports `@sentry/server-utils/orchestrion/import-hook` directly. - Drop the obsolete `./loader` export (the iitm `--loader` entry, unused on Node >= 20.19). ## Why Orchestrion is the only instrumentation path now, so the framework's `--import` hook should register it directly instead of the removed iitm loader. `--loader` no longer applies (minimum Node is 20.19.0) and orchestrion has no `--loader` equivalent, so the `./loader` export is dead.
## What Top of the `@opentelemetry/instrumentation` removal stack. - Remove the legacy `makeOtelLoaders` rollup util and its hook templates (`otelEsm*`, `sentryNodeEsm*`). ## Why The base PR (#22843) kept `makeOtelLoaders` as a temporary shim so the framework SDKs kept building while each migrated to `makeOrchestrionLoader` in its own stacked PR. With all of them migrated, the iitm-era util and templates are unused and can go.

What
Bottom of a stack. Removes the
@opentelemetry/instrumentationdependency from@sentry/node, the last package that still declared it.generateInstrumentOnceexport (and the framework re-exports of it).ensureIsWrappedand themissing_instrumentationcontext it set, and thedisableInstrumentationWarningsoption andMissingInstrumentationContexttype from@sentry/core.InstrumentationConfigtypes in@sentry/node.@sentry/node/importan orchestrion-only diagnostics-channel hook; remove the legacy iitm@sentry/node/loaderentry.makeOrchestrionLoaderrollup util (import-only, delegates to@sentry/server-utils/orchestrion/import-hook). The legacymakeOtelLoadersutil is kept temporarily so the framework SDKs still build until they migrate in the PRs stacked on top of this one.Why
All instrumentation is channel-based via orchestrion, so nothing uses
@opentelemetry/instrumentationanymore.generateInstrumentOncehad no call sites, andensureIsWrapped's shimmer-based detection can't see channel-based express/koa/hapi, so its warning only produced false negatives. The@sentry/node/importhook already registered the orchestrion injection; the iitmregister()it also did instrumented nothing.Breaking change, part of the v11 major. Keeping
makeOtelLoadersin this PR keepsdevelopgreen as each framework migrates in its own follow-up PR.