Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Jan 3, 2025
1 parent 0effa32 commit 97bfa6a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ext/telemetry/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,17 @@ export function bootstrap(
default:
break;
}

if (TRACING_ENABLED || METRICS_ENABLED) {
const otel = globalThis[SymbolFor("opentelemetry.js.api.1")] ??= {};
if (TRACING_ENABLED) {
otel.tracing = new TracerProvider();
otel.context = new ContextManager();
}
if (METRICS_ENABLED) {
otel.metrics = new MeterProvider();
}
}
}

export const telemetry = {
Expand Down

0 comments on commit 97bfa6a

Please sign in to comment.