Elastic Distribution of OpenTelemetry Node.js release notes
Serverless Observability Stack
Review the changes, fixes, and more in each version of Elastic Distribution of OpenTelemetry Node.js (EDOT Node.js).
To check for breaking changes, see EDOT Node.js Breaking Changes.
To check for security updates, go to Security announcements for the Elastic stack.
Add support for
ELASTIC_OTEL_OPAMP_HEADERSenvironment variable for setting headers for OpAMP requests. This typically would be used to specify authorization for a givenELASTIC_OTEL_OPAMP_ENDPOINT, e.g.:export ELASTIC_OTEL_OPAMP_HEADERS="Authorization=ApiKey sekrit". #1069Add support for dynamic configuration of the sampling rate of the default logger via the
sampling_ratevariable in Central Configuration. #1070While this is supported in the EDOT Node.js SDK, it will only be present in the "Agent Configuration" UI of Kibana version 9.3 and later.
Update to the latest upstream OpenTelemetry JS dependencies. (#1062)
Switch to trusted publishing (https://docs.npmjs.com/trusted-publishers) as a security precaution against supply-chain attacks.
The Elastic-authored
@elastic/opentelemetry-instrumentation-openaiinstrumentation has been upstreamed to OpenTelemetry. EDOT Node.js now uses the@opentelemetry/instrumentation-openaipackage to instrumentopenai. The newer package supports instrumenting openai@5 -- the current major version. #1015- If you were using
@elastic/opentelemetry-instrumentation-openaiwith theOTEL_NODE_ENABLED_INSTRUMENTATIONSorOTEL_NODE_ENABLED_INSTRUMENTATIONSenvironment variables, you should switch to usingopenai. The old value will still work until the next major release.
- If you were using
- Update to latest
@opentelemetry/*dependencies (#1027), which includes a fix for a bug in@opentelemetry/otlp-exporter-base@0.204.0that could break bundling.
Added
@opentelemetry/instrumentation-oracledbto the default set of instrumentations.New Central Configuration settings. Typically these settings are only useful for temporary debugging of telemetry.
send_traces: A boolean to disable/enable sending of trace telemetry (i.e. spans).send_metrics: The same, for the metrics signal.send_logs: The same, for the logs signal.
While these are supported in EDOT Node.js, they will only be present in "Agent Configuration" UI of Kibana version 9.2 and later. #928
New
ELASTIC_OTEL_CONTEXT_PROPAGATION_ONLYconfiguration environment variable. Set this totrueto disable sending of spans, but otherwise continue to do context propagation. This can be useful in limited conditions to support propagating trace-context through a service to downstream services for distributed tracing, but not collect spans from the service. (Note that this typically results in incomplete or broken traces in Kibana trace viewer.) #928
- OTLP export requests (HTTP flavors only) will include an identifier for EDOT Node.js in the User-Agent header. #982
Initial support for Central Configuration: the ability to configure some aspects of EDOT Node.js in running instrumented applications from a central Kibana. This feature is in technical preview. #834 #886
This release includes support for the following settings:
logging_level,deactivate_all_instrumentations,deactivate_instrumentations
- Support for instrumenting
redisversion 4 has moved from@opentelemetry/instrumentation-redis-4to@opentelemetry/instrumentation-redis. If you are using theOTEL_NODE_ENABLED_INSTRUMENTATIONSorOTEL_NODE_DISABLED_INSTRUMENTATIONSenvironment variables to control instrumentation ofredis@4you will need to change from using "redis-4" to "redis".
Fix publishing so that the "hook.mjs" file is included. #835
Without this fix, using
node --import @elastic/opentelemetry-node ...will crash with:Cannot find module '.../node_modules/@elastic/opentelemetry-node/hook.mjs' imported from .../node_modules/@elastic/opentelemetry-node/import.mjs
- Added the
ELASTIC_OTEL_HOST_METRICS_DISABLEDenvironment variable to control whether EDOT Node.js collects host metrics (process.*). This means users can turn off host metrics without affecting metrics from instrumentations. #736
The ELASTIC_OTEL_METRICS_DISABLED environment variable is now deprecated. Use OTEL_METRICS_EXPORTER=none to turn off any metrics exported by EDOT Node.js.
- Restored the
@elastic/opentelemetry-node/sdkentry point. You can usenode --import ./telemetry.mjs app.jsrather than the typical zero-codenode --import @elastic/opentelemetry-node app.jsmethod for starting the SDK. #718.
The ./telemetry.mjs file uses APIs exported by @elastic/opentelemetry-node/sdk
to configure and start the OpenTelemetry Node.js SDK. See examples/telemetry.mjs.
Bootstrapping the Node SDK in code often requires using OpenTelemetry JS APIs that are not yet stable. These APIs might break in minor versions of @elastic/opentelemetry-node.
- Default to stable semantic conventions for HTTP instrumentation. #669.
- Upgraded upstream OTel dependencies to SDK 2.0. This should be non-breaking
for users of
node --import @elastic/opentelemetry-node my-app.jsto start EDOT Node.js for their application. #663. - Use
peerDependenciesfor@opentelemetry/apidependency, and cap it to a known-supported maximum version, according to OTel JS guidance for implementors. #606.
- Improved ES module (ESM) instrumentation. #584. As part of this change, using
--require @elastic/opentelemetry-nodewill no longer set up a module hook for instrumenting ES modules; only using--import @elastic/opentelemetry-nodewill do so. Use--import @elastic/opentelemetry-nodeto start EDOT Node.js. Using--require ...is still valid when you know your application is only using CommonJS modules. - Added
@opentelemetry/instrumentation-mysqlto the default set of instrumentations. - Added
@opentelemetry/instrumentation-mysql2to the default set of instrumentations. - Added
@opentelemetry/instrumentation-cassandra-driverto the default set of instrumentations. - Test that the native instrumentation in
@elastic/elasticsearch@8.15.0and later works.
- Added
@elastic/opentelemetry-instrumentation-openaito the default set of instrumentations.
- Bumped
@opentelemetry/*dependencies.
- Fixed release workflow. v0.4.0 was released without a GitHub releases entry.
A Docker image is now being published that can be used with the OpenTelemetry Operator's support for auto-instrumentation injection (#374):
docker.elastic.co/observability/elastic-otel-node:${version}and:latestwill be published for tagged releasesdocker.elastic.co/observability/elastic-otel-node:edgewill be published for each push to "main".
- Added the following instrumentations:
@opentelemetry/instrumentation-connect @opentelemetry/instrumentation-cucumber @opentelemetry/instrumentation-dataloader @opentelemetry/instrumentation-dns @opentelemetry/instrumentation-generic-pool @opentelemetry/instrumentation-knex @opentelemetry/instrumentation-koa @opentelemetry/instrumentation-lru-memoizer @opentelemetry/instrumentation-memcached @opentelemetry/instrumentation-nestjs-core @opentelemetry/instrumentation-net @opentelemetry/instrumentation-redis @opentelemetry/instrumentation-restify @opentelemetry/instrumentation-router @opentelemetry/instrumentation-socket.io - Bumped minimum supported Node.js version to v14.18.0.
- Added the following
@opentelemetry/instrumentation-*instrumentations:hapi,aws-sdk,redis-4,grpc,pino. - Added cloud and container resource detectors, the same set included in
@opentelemetry/auto-instrumentations-node. These are enabled by default. UseOTEL_NODE_RESOURCE_DETECTORSto set an explicit list of detectors. - Added missing exporters for logs and metrics signals. This means that
OTEL_EXPORTER_OTLP_PROTOCOL=grpcandOTEL_EXPORTER_OTLP_PROTOCOL=http/jsonnow work. Before this change only the defaulthttp/protoOTLP export protocol would work by default.
- Correct another issue with "repository.url" setting in package.json, required for npm provenance generation.
Correct "repository.url" setting in package.json, required for npm provenance generation.
- Trimmed files included in published npm package.
First release of the Elastic Distribution of OpenTelemetry Node.js.