Skip to content

Commit 14d5fbf

Browse files
committed
doc(js-autoinstrumentation): document JS auto-instrumentation
# 4130
1 parent 8fd72df commit 14d5fbf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

content/en/docs/languages/js/automatic/configuration.md

+17
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,20 @@ For example, to only enable the `env` and `host` detectors, you can set:
3939
```shell
4040
OTEL_NODE_RESOURCE_DETECTORS=env,host
4141
```
42+
43+
### Excluding auto-instrumentation
44+
45+
By default, all
46+
[supported instrumentation libraries](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/metapackages/auto-instrumentations-node/README.md#supported-instrumentations)
47+
are enabled,
48+
but you can use the environment variable `OTEL_NODE_ENABLED_INSTRUMENTATIONS` to enable only certain instrumentations
49+
by providing a comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix.
50+
51+
For example, to enable only
52+
[@opentelemetry/instrumentation-http](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http)
53+
and [@opentelemetry/instrumentation-nestjs-core](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-nestjs-core)
54+
instrumentations:
55+
56+
```shell
57+
OTEL_NODE_ENABLED_INSTRUMENTATIONS="http,nestjs-core"
58+
```

0 commit comments

Comments
 (0)