Skip to content

Commit 756f409

Browse files
committed
doc(js-autoinstrumentation): document JS auto-instrumentation
open-telemetry#4130
1 parent c4532a3 commit 756f409

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

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

+19
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,22 @@ 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, but you can use the environment variable
48+
`OTEL_NODE_ENABLED_INSTRUMENTATIONS` to enable only certain instrumentations by
49+
providing a comma-separated list of the instrumentation package names without
50+
the `@opentelemetry/instrumentation-` prefix.
51+
52+
For example, to enable only
53+
[@opentelemetry/instrumentation-http](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http)
54+
and
55+
[@opentelemetry/instrumentation-express](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-express)
56+
instrumentations:
57+
58+
```shell
59+
OTEL_NODE_ENABLED_INSTRUMENTATIONS="http,express"
60+
```

0 commit comments

Comments
 (0)