Skip to content

Commit 4b89260

Browse files
Update OTel JS Autoinstrumentation env var config (#4181)
Co-authored-by: opentelemetrybot <[email protected]>
1 parent 666f583 commit 4b89260

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,23 @@ Alternatively, you can use `export` to set environment variables:
3838

3939
```shell
4040
export OTEL_TRACES_EXPORTER="otlp"
41-
export OTEL_METRICS_EXPORTER="otlp"
4241
export OTEL_EXPORTER_OTLP_ENDPOINT="your-endpoint"
4342
export OTEL_NODE_RESOURCE_DETECTORS="env,host,os"
4443
export OTEL_SERVICE_NAME="your-service-name"
4544
export NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register"
4645
node app.js
4746
```
4847

48+
{{% alert title="Note" color="info" %}}
49+
50+
Currently, only Traces are supported for environment variable configuration. See
51+
the open issues for
52+
[Metrics](https://github.com/open-telemetry/opentelemetry-js/issues/4551) and
53+
[Logs](https://github.com/open-telemetry/opentelemetry-js/issues/4552) to learn
54+
more.
55+
56+
{{% /alert %}}
57+
4958
By default, all SDK [resource detectors](/docs/languages/js/resources/) are
5059
used. You can use the environment variable `OTEL_NODE_RESOURCE_DETECTORS` to
5160
enable only certain detectors, or to completely disable them.

static/refcache.json

+8
Original file line numberDiff line numberDiff line change
@@ -3519,6 +3519,14 @@
35193519
"StatusCode": 200,
35203520
"LastSeen": "2024-01-18T20:05:19.47948-05:00"
35213521
},
3522+
"https://github.com/open-telemetry/opentelemetry-js/issues/4551": {
3523+
"StatusCode": 200,
3524+
"LastSeen": "2024-03-19T06:37:03.56499722Z"
3525+
},
3526+
"https://github.com/open-telemetry/opentelemetry-js/issues/4552": {
3527+
"StatusCode": 200,
3528+
"LastSeen": "2024-03-19T06:37:04.053171348Z"
3529+
},
35223530
"https://github.com/open-telemetry/opentelemetry-js/releases": {
35233531
"StatusCode": 200,
35243532
"LastSeen": "2024-01-18T19:37:16.288484-05:00"

0 commit comments

Comments
 (0)