There was an error while loading. Please reload this page.
1 parent 57ef2f2 commit 985f4baCopy full SHA for 985f4ba
1 file changed
packages/node/src/sdk/initOtel.ts
@@ -48,6 +48,8 @@ function registerGlobalTracerProvider(provider: TracerProvider): boolean {
48
return true;
49
}
50
51
+ // @opentelemetry/api stores the registry under a `Symbol.for` key that no public type
52
+ // describes, so `typeof globalThis` can only be narrowed to it by casting through `unknown`.
53
const otelGlobal = globalThis as unknown as Record<symbol, { trace?: unknown } | undefined>;
54
const registry = otelGlobal[OTEL_API_GLOBAL_KEY];
55
if (registry && !registry.trace) {
0 commit comments