From 4b89260947e01373475ecfacf5c37ebff8313ab8 Mon Sep 17 00:00:00 2001 From: Phillip Carter <pcarter@fastmail.com> Date: Tue, 19 Mar 2024 01:47:23 -0700 Subject: [PATCH] Update OTel JS Autoinstrumentation env var config (#4181) Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> --- content/en/docs/languages/js/automatic/_index.md | 11 ++++++++++- static/refcache.json | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/content/en/docs/languages/js/automatic/_index.md b/content/en/docs/languages/js/automatic/_index.md index e0f07f8ff401..f69169d01d05 100644 --- a/content/en/docs/languages/js/automatic/_index.md +++ b/content/en/docs/languages/js/automatic/_index.md @@ -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. diff --git a/static/refcache.json b/static/refcache.json index 13e7a09818bf..0b5dbedb5aa2 100644 --- a/static/refcache.json +++ b/static/refcache.json @@ -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"