diff --git a/packages/core-shared/src/instrumentation/otel/init-server-node.ts b/packages/core-shared/src/instrumentation/otel/init-server-node.ts index bb4e35d..e3adc36 100644 --- a/packages/core-shared/src/instrumentation/otel/init-server-node.ts +++ b/packages/core-shared/src/instrumentation/otel/init-server-node.ts @@ -1,8 +1,9 @@ -import { NodeSDK } from "@opentelemetry/sdk-node"; -import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base"; +import { NodeSDK, tracing } from "@opentelemetry/sdk-node"; import { buildResource } from "./resource"; import { createSentryOtelBridge } from "./sentry-bridge"; +const { BatchSpanProcessor } = tracing; + export type InitOtelServerNodeOpts = { /** Sentry DSN. When empty, OTel SDK boots without the Sentry exporter. */ dsn: string; diff --git a/packages/core-shared/src/instrumentation/otel/sentry-bridge.ts b/packages/core-shared/src/instrumentation/otel/sentry-bridge.ts index 39d888c..76f3b82 100644 --- a/packages/core-shared/src/instrumentation/otel/sentry-bridge.ts +++ b/packages/core-shared/src/instrumentation/otel/sentry-bridge.ts @@ -1,5 +1,7 @@ -import type { SpanProcessor } from "@opentelemetry/sdk-trace-base"; -import type { LogRecordProcessor } from "@opentelemetry/sdk-logs"; +import type { tracing as sdkTracing, logs as sdkLogs } from "@opentelemetry/sdk-node"; + +type SpanProcessor = sdkTracing.SpanProcessor; +type LogRecordProcessor = sdkLogs.LogRecordProcessor; export type SentryOtelBridgeOpts = { /** Sentry DSN. When empty, no Sentry processors are returned (Noop boot). */