Update OTel JS Autoinstrumentation env var config (#4181)

Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
This commit is contained in:
Phillip Carter 2024-03-19 01:47:23 -07:00 committed by GitHub
parent 666f5835bd
commit 4b89260947
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 1 deletions

View File

@ -38,7 +38,6 @@ Alternatively, you can use `export` to set environment variables:
```shell
export OTEL_TRACES_EXPORTER="otlp"
export OTEL_METRICS_EXPORTER="otlp"
export OTEL_EXPORTER_OTLP_ENDPOINT="your-endpoint"
export OTEL_NODE_RESOURCE_DETECTORS="env,host,os"
export OTEL_SERVICE_NAME="your-service-name"
@ -46,6 +45,16 @@ export NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/registe
node app.js
```
{{% alert title="Note" color="info" %}}
Currently, only Traces are supported for environment variable configuration. See
the open issues for
[Metrics](https://github.com/open-telemetry/opentelemetry-js/issues/4551) and
[Logs](https://github.com/open-telemetry/opentelemetry-js/issues/4552) to learn
more.
{{% /alert %}}
By default, all SDK [resource detectors](/docs/languages/js/resources/) are
used. You can use the environment variable `OTEL_NODE_RESOURCE_DETECTORS` to
enable only certain detectors, or to completely disable them.

View File

@ -3519,6 +3519,14 @@
"StatusCode": 200,
"LastSeen": "2024-01-18T20:05:19.47948-05:00"
},
"https://github.com/open-telemetry/opentelemetry-js/issues/4551": {
"StatusCode": 200,
"LastSeen": "2024-03-19T06:37:03.56499722Z"
},
"https://github.com/open-telemetry/opentelemetry-js/issues/4552": {
"StatusCode": 200,
"LastSeen": "2024-03-19T06:37:04.053171348Z"
},
"https://github.com/open-telemetry/opentelemetry-js/releases": {
"StatusCode": 200,
"LastSeen": "2024-01-18T19:37:16.288484-05:00"