@sentry/remix still uses an OpenTelemetry InstrumentationBase module patcher as its default server path (instrumentRemixWithOpenTelemetry), only using the channel-based subscriber when isOrchestrionInjected(). It needs to fully move to channel-based instrumentation so it no longer depends on the import-in-the-middle ESM loader hook.
Context / why now
#22346 removed esmLoader.ts from @sentry/node, so the SDK no longer registers the import-in-the-middle ESM loader hook on programmatic Sentry.init(). Same regression shape as the NestJS ticket:
- Broken: an ESM Remix server initialized via programmatic init without
--import @sentry/node/import and without orchestrion → the OTel patcher can't patch ESM modules, so Remix server spans are silently lost.
- Still fine: CJS servers, and anything started with
--import @sentry/node/import. No e2e currently exercises the broken path, which is why CI stayed green.
Relevant code (packages/remix/src/server/)
integrations/RemixIntegration.ts — setupOnce branches on isOrchestrionInjected(): channel instrumentRemix() vs OTel instrumentRemixWithOpenTelemetry().
integrations/tracing-channel.ts — the channel path (already exists).
../vendor/instrumentation.ts — the vendored OTel InstrumentationBase patcher to remove.
Work
Notes
@sentry/remixstill uses an OpenTelemetryInstrumentationBasemodule patcher as its default server path (instrumentRemixWithOpenTelemetry), only using the channel-based subscriber whenisOrchestrionInjected(). It needs to fully move to channel-based instrumentation so it no longer depends on the import-in-the-middle ESM loader hook.Context / why now
#22346 removed
esmLoader.tsfrom@sentry/node, so the SDK no longer registers the import-in-the-middle ESM loader hook on programmaticSentry.init(). Same regression shape as the NestJS ticket:--import @sentry/node/importand without orchestrion → the OTel patcher can't patch ESM modules, so Remix server spans are silently lost.--import @sentry/node/import. No e2e currently exercises the broken path, which is why CI stayed green.Relevant code (
packages/remix/src/server/)integrations/RemixIntegration.ts—setupOncebranches onisOrchestrionInjected(): channelinstrumentRemix()vs OTelinstrumentRemixWithOpenTelemetry().integrations/tracing-channel.ts— the channel path (already exists).../vendor/instrumentation.ts— the vendored OTelInstrumentationBasepatcher to remove.Work
--import) to cover this path.@opentelemetry/instrumentationfrom@sentry/remixonce the patcher is gone.Notes
@sentry/node#22346 (node) and the NestJS iitm-migration ticket.