Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OTel JS Autoinstrumentation env var config #4181

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion content/en/docs/languages/js/automatic/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,23 @@ 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"
export NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register"
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.
Expand Down
8 changes: 8 additions & 0 deletions static/refcache.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading