Elastic Distribution of OpenTelemetry Node.js (EDOT Node.js)
npm install @elastic/opentelemetry-nodeThe Elastic Distribution of OpenTelemetry Node.js (EDOT Node.js) is a lightweight wrapper around the OpenTelemetry SDK for Node.js that makes it easy to get started using OpenTelemetry in your Node.js applications, especially if you are using Elastic Observability as your observability solution.
``bashInstall it
npm install --save @elastic/opentelemetry-node
See the EDOT Node.js docs for details.
Some direct links:
* Get started
* Configuration
* Changelog / Release Notes
* Elastic Discuss forum | GitHub issue tracker
How does EDOT Node.js differ from the OpenTelemetry JS SDK?
EDOT Node.js is very similar to the
@opentelemetry/auto-instrumentations-node package from OpenTelemetry in its usage goal: a single-dependency that provides a simple path to zero-code instrumentation of Node.js applications. In general, Elastic's goal is to contribute all SDK improvements upstream. That said, there are sometimes differences that are specific to Elastic (e.g. talking to an Elastic service for central configuration, Elastic-authored additional instrumentations). Here is a concise list of differences:- EDOT Node.js supports dynamic central configuration of some settings of the running SDK.
- EDOT Node.js, being a distribution of the OpenTelemetry JS SDK, always adds the
telemetry.distro.* resource attributes to identify itself.
- EDOT Node.js enables some metrics by default that are not included by @opentelemetry/auto-instrumentations-node: a subset of metrics from @opentelemetry/host-metrics.
- EDOT Node.js defaults to OTEL_SEMCONV_STABILITY_OPT_IN=http such that telemetry from the @opentelemetry/instrumentation-http package will use stable HTTP semantic conventions by default. Upstream OpenTelemetry JS has a tracking issue for the migration to newer HTTP semantic conventions in its instrumentations.
- EDOT Node.js defaults to OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta, which differs from the upstream OpenTelemetry JS default of cumulative.
- EDOT Node.js uses the more recent import-in-the-middle createAddHookMessageChannel` feature for improved ESM support. We hope to upstream support for this.