Zero-Code Instrumentation Configuration
This module is highly configurable by setting environment variables. Many aspects of the auto instrumentation’s behavior can be configured for your needs, such as resource detectors, exporters, trace context propagation headers, and more.
SDK and exporter configuration
SDK and exporter configuration can be set using environment variables. More information can be found here.
SDK resource detector configuration
By default, the module will enable all SDK resource detectors. You can use the
OTEL_NODE_RESOURCE_DETECTORS
environment variable to enable only certain
detectors, or completely disable them:
env
host
os
process
serviceinstance
container
alibaba
aws
azure
gcp
all
- enables all resource detectorsnone
- disables resource detection
For example, to only enable the env
and host
detectors, you can set:
OTEL_NODE_RESOURCE_DETECTORS=env,host
Excluding instrumentation libraries
By default, all
supported instrumentation libraries
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 and @opentelemetry/instrumentation-express instrumentations:
OTEL_NODE_ENABLED_INSTRUMENTATIONS="http,express"
[i18n] feedback_title
[i18n] feedback_question
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!