Skip to content

Commit 099b96e

Browse files
authored
feat(node): Update docs for manual OTEL setup (#10145)
1 parent c4cb26f commit 099b96e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/platforms/javascript/common/performance/instrumentation/opentelemetry.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ const Sentry = require("@sentry/node");
5858
const {
5959
SentrySpanProcessor,
6060
SentryPropagator,
61-
SentryContextManager,
6261
SentrySampler,
6362
} = require("@sentry/opentelemetry");
6463

@@ -78,13 +77,16 @@ provider.addSpanProcessor(new SentrySpanProcessor());
7877
// We need a custom propagator and context manager
7978
provier.register({
8079
propagator: new SentryPropagator(),
81-
contextManager: new SentryContextManager(),
80+
contextManager: new Sentry.SentryContextManager(),
8281
});
8382

8483
// We need our sampler to ensure the correct subset of traces is sent to Sentry
8584
const provider = new BasicTracerProvider({
8685
sampler: new SentrySampler(Sentry.getClient()),
8786
});
87+
88+
// Validate that the setup is correct
89+
Sentry.validateOpenTelemetrySetup();
8890
```
8991

9092
## Using an OpenTelemetry Tracer

0 commit comments

Comments
 (0)