Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions packages/opentelemetry/src/tracingChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 * as diagnosticsChannel from 'node:diagnostics_channel';
import type { Span } from '@opentelemetry/api';
import { context, trace } from '@opentelemetry/api';
import { logger } from '@sentry/core';
Expand Down Expand Up @@ -53,9 +53,10 @@ export function tracingChannel<TData extends object = object>(
channelNameOrInstance: string,
transformStart: OtelTracingChannelTransform<TData>,
): OtelTracingChannel<TData, TracingChannelContextWithSpan<TData>> {
const channel = nativeTracingChannel<TracingChannelContextWithSpan<TData>, TracingChannelContextWithSpan<TData>>(
channelNameOrInstance,
) as unknown as OtelTracingChannel<TData, TracingChannelContextWithSpan<TData>>;
const channel = diagnosticsChannel.tracingChannel<
TracingChannelContextWithSpan<TData>,
TracingChannelContextWithSpan<TData>
>(channelNameOrInstance) as unknown as OtelTracingChannel<TData, TracingChannelContextWithSpan<TData>>;
Comment thread
sentry[bot] marked this conversation as resolved.

let lookup: AsyncLocalStorageLookup | undefined;
try {
Expand Down
Loading