From a7f82cb5cb3541750c02908d5c7a6132d7526663 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Thu, 18 Jun 2026 12:02:35 +0100 Subject: [PATCH 1/2] fix: Diagnostics channel Node v18 --- packages/opentelemetry/src/tracingChannel.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/opentelemetry/src/tracingChannel.ts b/packages/opentelemetry/src/tracingChannel.ts index 5548201c5f4c..a433dfc82690 100644 --- a/packages/opentelemetry/src/tracingChannel.ts +++ b/packages/opentelemetry/src/tracingChannel.ts @@ -5,7 +5,7 @@ * using Node.js diagnostic_channel's `bindStore` mechanism. */ import type { TracingChannel, TracingChannelSubscribers } from 'node:diagnostics_channel'; -import { tracingChannel as nativeTracingChannel } from 'node:diagnostics_channel'; +import diagnosticsChannel from 'node:diagnostics_channel'; import type { Span } from '@opentelemetry/api'; import { context, trace } from '@opentelemetry/api'; import { logger } from '@sentry/core'; @@ -53,9 +53,10 @@ export function tracingChannel( channelNameOrInstance: string, transformStart: OtelTracingChannelTransform, ): OtelTracingChannel> { - const channel = nativeTracingChannel, TracingChannelContextWithSpan>( - channelNameOrInstance, - ) as unknown as OtelTracingChannel>; + const channel = diagnosticsChannel.tracingChannel< + TracingChannelContextWithSpan, + TracingChannelContextWithSpan + >(channelNameOrInstance) as unknown as OtelTracingChannel>; let lookup: AsyncLocalStorageLookup | undefined; try { From 3485417dc1bb57bd61dea26a4a0d3260207d0f7d Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Thu, 18 Jun 2026 12:21:23 +0100 Subject: [PATCH 2/2] oops --- packages/opentelemetry/src/tracingChannel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opentelemetry/src/tracingChannel.ts b/packages/opentelemetry/src/tracingChannel.ts index a433dfc82690..88d0d384c58f 100644 --- a/packages/opentelemetry/src/tracingChannel.ts +++ b/packages/opentelemetry/src/tracingChannel.ts @@ -5,7 +5,7 @@ * using Node.js diagnostic_channel's `bindStore` mechanism. */ import type { TracingChannel, TracingChannelSubscribers } from 'node:diagnostics_channel'; -import diagnosticsChannel from 'node:diagnostics_channel'; +import * as diagnosticsChannel from 'node:diagnostics_channel'; import type { Span } from '@opentelemetry/api'; import { context, trace } from '@opentelemetry/api'; import { logger } from '@sentry/core';