Skip to content

Commit 24fade4

Browse files
authored
Use addOpenTelemetryInstrumentation method (#10398)
1 parent 2a0dcb6 commit 24fade4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const Sentry = require("@sentry/node");
2929
const {
3030
GenericPoolInstrumentation,
3131
} = require("@opentelemetry/instrumentation-generic-pool");
32-
const { registerInstrumentations } = require("@opentelemetry/instrumentation");
3332

3433
Sentry.init({
3534
dsn: "__DSN__",
@@ -39,9 +38,7 @@ Sentry.init({
3938
});
4039

4140
// Afterwards, you can add additional instrumentation:
42-
registerInstrumentations({
43-
instrumentations: [new GenericPoolInstrumentation()],
44-
});
41+
Sentry.addOpenTelemetryInstrumentation(new GenericPoolInstrumentation());
4542
```
4643

4744
Any instrumentation added like this will be automatically picked up by Sentry.

0 commit comments

Comments
 (0)