Skip to content

Commit

Permalink
doc(js-autoinstrumentation): document JS auto-instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
atsu85 committed Apr 11, 2024
1 parent 8fd72df commit e540c38
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions content/en/docs/languages/js/automatic/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,22 @@ For example, to only enable the `env` and `host` detectors, you can set:
```shell
OTEL_NODE_RESOURCE_DETECTORS=env,host
```

### Excluding auto-instrumentation

By default, all
[supported instrumentation libraries](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/metapackages/auto-instrumentations-node/README.md#supported-instrumentations)
are enabled, but you can use the environment variable
`OTEL_NODE_ENABLED_INSTRUMENTATIONS` to enable only certain instrumentations by
providing a comma-separated list of the instrumentation package names without
the `@opentelemetry/instrumentation-` prefix.

For example, to enable only
[@opentelemetry/instrumentation-http](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http)
and
[@opentelemetry/instrumentation-nestjs-core](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-nestjs-core)
instrumentations:

```shell
OTEL_NODE_ENABLED_INSTRUMENTATIONS="http,nestjs-core"
```

0 comments on commit e540c38

Please sign in to comment.