Title: Remove `@opentelemetry/instrumentation` dependency from `@sentry/node` · Issue #22759 · getsentry/sentry-javascript · GitHub
Open Graph Title: Remove `@opentelemetry/instrumentation` dependency from `@sentry/node` · Issue #22759 · getsentry/sentry-javascript
X Title: Remove `@opentelemetry/instrumentation` dependency from `@sentry/node` · Issue #22759 · getsentry/sentry-javascript
Description: After removing the iitm-based instrumentations (#22346) and the deprecated InstrumentationBase-derived classes, @sentry/node no longer registers any OpenTelemetry/import-in-the-middle module patchers. But it still depends on @opentelemet...
Open Graph Description: After removing the iitm-based instrumentations (#22346) and the deprecated InstrumentationBase-derived classes, @sentry/node no longer registers any OpenTelemetry/import-in-the-middle module patche...
X Description: After removing the iitm-based instrumentations (#22346) and the deprecated InstrumentationBase-derived classes, @sentry/node no longer registers any OpenTelemetry/import-in-the-middle module patche...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/22759
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove `@opentelemetry/instrumentation` dependency from `@sentry/node`","articleBody":"After removing the iitm-based instrumentations (getsentry/sentry-javascript#22346) and the deprecated `InstrumentationBase`-derived classes, `@sentry/node` no longer registers any OpenTelemetry/import-in-the-middle module patchers. But it still depends on `@opentelemetry/instrumentation` for a handful of live imports. This ticket tracks vendoring/reimplementing those so we can drop the dependency, mirroring the `@opentelemetry/core` removal effort in getsentry/sentry-javascript#21674.\n\n## Remaining consumers (as of getsentry/sentry-javascript#22346 end state)\n\nLive code imports:\n\n* `packages/node/src/otel/instrument.ts` — `registerInstrumentations`, `Instrumentation` (type). Backs `generateInstrumentOnce`, which is a public export (`src/index.ts`).\n* `packages/node/src/utils/ensureIsWrapped.ts` — `isWrapped`. Used by the Express/Koa/Hapi/Fastify error-handler setup to warn if the app object wasn't wrapped.\n\nType-only imports (trivial to inline):\n\n* `packages/node/src/integrations/http/SentryHttpInstrumentation.ts` — `InstrumentationConfig`, base of the public `SentryHttpInstrumentationOptions`.\n* `packages/node/src/integrations/tracing/redis/vendored/types.ts` — `InstrumentationConfig`, base of the redis cache option types used by `cache.ts`.\n\n## Work\n\n- [ ] Reimplement or vendor `registerInstrumentations` + the `Instrumentation` type behind `generateInstrumentOnce` (or evaluate whether `generateInstrumentOnce` still needs to exist at all now that nothing internal calls it — it only remains as a public export).\n- [ ] Reimplement/vendor `isWrapped` (small shimmer helper).\n- [ ] Inline the two `InstrumentationConfig` type usages.\n- [ ] Drop `@opentelemetry/instrumentation` from `packages/node/package.json`.\n\n## Notes\n\n* Gated on getsentry/sentry-javascript#22346 (iitm instrumentation removal) landing first.\n* Overlaps with getsentry/sentry-javascript#22555: removing/replacing `isWrapped` is a chance to also fix the false \"not instrumented\" warnings that `ensureIsWrapped` now emits for channel-based Express/Koa/Hapi. Consider folding that fix in here.\n* Sibling of the `@opentelemetry/core` removal (getsentry/sentry-javascript#21674); same vendor-then-drop shape.\n* Related: getsentry/sentry-javascript#22489 (remove iitm-based instrumentations from `@sentry/core`).","author":{"url":"https://github.com/andreiborza","@type":"Person","name":"andreiborza"},"datePublished":"2026-07-28T12:13:25Z","url":"https://github.com/getsentry/sentry-javascript/issues/22759"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7d3946a2-f977-7241-3916-957bb34eb08a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E1A0:3EF53B:2D97D0:3CFA8C:6B04B7F7 |
| html-safe-nonce | 5e273e3618c004388fd96e936369aea4467ee913784894a77282c6d1621c96cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUEwOjNFRjUzQjoyRDk3RDA6M0NGQThDOjZCMDRCN0Y3IiwidmlzaXRvcl9pZCI6IjcxMjE0NDE2NzI3ODUwODIzNTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 09e8e17b845cb5276242431c8651fc9aed7f3cf50bd14cc8e6459b6ce68d00f3 |
| hovercard-subject-tag | issue:4998416777 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/22759/issue_layout |
| twitter:image | https://opengraph.githubassets.com/48bc3eedc41223fc2ed0cf8eb462834c09cce2beb8358985dd0a2dec1a25f3d5/getsentry/sentry-javascript/issues/22759 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/48bc3eedc41223fc2ed0cf8eb462834c09cce2beb8358985dd0a2dec1a25f3d5/getsentry/sentry-javascript/issues/22759 |
| og:image:alt | After removing the iitm-based instrumentations (#22346) and the deprecated InstrumentationBase-derived classes, @sentry/node no longer registers any OpenTelemetry/import-in-the-middle module patche... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andreiborza |
| hostname | github.com |
| expected-hostname | github.com |
| None | 378bd702ac792b3550e484ad39d9a898fcd25bb52ba6962b0c9cc457c1ea71c7 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b032e77f1ea437ede6c115446a0a467709b468e7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width