Use OpenTelemetry with Elastic APM
OpenTelemetry is a set of APIs, SDKs, tooling, and integrations that enable the capture and management of telemetry data from your services and applications. You can use OpenTelemetry to collect application performance data in Elastic APM, whether you’re running serverless, self-managed, or hybrid deployments.
Install OpenTelemetry content packs to work with OpenTelemetry data
To visualize data from OpenTelemetry receivers which is stored natively as OpenTelemetry semantic conventions, you must install content-only packs that provide dashboards compatible with OpenTelemetry data.
In the Kibana Integrations UI, search for otel to find and install available integrations, like System OpenTelemetry Assets, to access the dashboards. We are adding more OpenTelemetry content packs every week, reach out by opening an issue if what you are looking for is not available as an OTel content pack.
Other Integrations which are beats-based include dashboards based on ECS data and are not compatible with OpenTelemetry semantic conventions.
Elastic offers several distributions of OpenTelemetry. Each Elastic Distribution of OpenTelemetry is a customized version of an OpenTelemetry language SDK and the OpenTelemetry Collector, ready to send data to the Managed OTLP endpoint, APM Server, or directly to Elasticsearch.
The following diagrams show the reference architecture for OpenTelemetry with Elastic, depending on your deployment model.
There are several ways to send OpenTelemetry data to Elastic. The right choice depends on your infrastructure, the technologies you're instrumenting, and whether you want Elastic to manage the pipeline.
- EDOT language SDKs: Use Elastic's customized OpenTelemetry SDKs, which apply opinionated defaults and preselected instrumentations for zero-code setup, with full Elastic support. The recommended approach for most applications. Refer to Why use the Elastic Distributions of OpenTelemetry? for more information.
- Contrib OpenTelemetry SDKs: Use community OpenTelemetry SDKs for a language that doesn't have an EDOT SDK, such as Go or C++. These work with Elastic over OTLP but receive community support only. Refer to Contrib OpenTelemetry Collector and SDKs for more information.
- Elastic APM agents with the OpenTelemetry bridge: Instrument your application with the vendor-neutral OpenTelemetry API while the Elastic APM agent collects and exports the data. Useful for reusing existing manual OpenTelemetry instrumentation without vendor lock-in, though some OpenTelemetry API features aren't supported. Refer to Contrib OpenTelemetry with Elastic APM agent for more information.
- EDOT Collector in Elastic Agent
: The EDOT Collector runs embedded inside Elastic Agent, sharing a single elastic-agent.ymlconfiguration file. No separate Collector installation is needed. Refer to Elastic Agent as an OpenTelemetry Collector for more information. - Standalone EDOT Collector: Run the EDOT Collector independently as its own process, without Elastic Agent. Refer to EDOT Collector for more information.
- Upstream
otelcol-contribCollector: Use the community-built Collector to forward data to an EDOT Collector or directly to APM Server or the managed intake service using OTLP. Useful for a vendor-neutral pipeline or fanning out to multiple observability backends, but it's community-supported only. Refer to Contrib OpenTelemetry Collectors and language SDKs for more information.
- Managed OTLP endpoint (Serverless and Elastic Cloud Hosted): Send OpenTelemetry data directly to the Managed OTLP endpoint without managing your own Collector.
With an Elastic Distribution of OpenTelemetry language SDK you have access to all the features of the OpenTelemetry SDK that it customizes, plus:
- You can get access to SDK improvements and bug fixes contributed by the Elastic team before the changes are available in the OpenTelemetry repositories.
- The distribution configures the collection of tracing and metrics signals, applying opinionated defaults, such as which sources are collected by default.
- By sending data through the EDOT Collector, you make sure to onboard infrastructure logs and metrics.
To set up OpenTelemetry with Elastic, refer to these guides for each SDK:
- Elastic Distribution of OpenTelemetry Java
- Elastic Distribution of OpenTelemetry .NET
- Elastic Distribution of OpenTelemetry Node.js
- Elastic Distribution of OpenTelemetry Python
- Elastic Distribution of OpenTelemetry PHP
- Elastic Distribution of OpenTelemetry Browser
For a complete overview of OpenTelemetry and Elastic, explore Elastic Distributions of OpenTelemetry.
The Elastic Stack natively supports the OpenTelemetry protocol (OTLP). This means trace data and metrics collected from your applications and infrastructure by an OpenTelemetry Collector or OpenTelemetry language SDK can be sent to Elastic.
You can set up an OpenTelemetry Collector based on contrib OpenTelemetry, instrument your application with an OpenTelemetry language SDK that sends data to the Collector, and use the Collector to process and export the data to either the Managed OTLP endpoint or APM Server or the managed intake service.
This approach works well when you need to instrument a technology that Elastic doesn’t provide a solution for. For example, if you want to instrument C or C++ you can use the OpenTelemetry C++ client. However, there are some limitations when using contrib OpenTelemetry collectors and language SDKs, including:
- Elastic can’t provide implementation support on how to use contrib OpenTelemetry tools.
- You won’t have access to Elastic enterprise APM features.
- You might experience problems with performance efficiency.
- Data ingested through a contrib Collector won't trigger automatic installation of OpenTelemetry content-pack assets, such as dashboards. Only data ingested through the EDOT Collector or Elastic Agent does.
For more on the limitations associated with using contrib OpenTelemetry tools, refer to Limitations.
Get started with contrib OpenTelemetry Collectors and language SDKs →
To understand the differences between Elastic Distributions of OpenTelemetry and contrib OpenTelemetry, refer to EDOT compared to contrib OpenTelemetry.
You can use the OpenTelemetry API/SDKs with Elastic APM agents to translate OpenTelemetry API calls to Elastic APM API calls. This allows you to reuse your existing OpenTelemetry instrumentation to create Elastic APM transactions and spans, avoiding vendor lock-in and having to redo manual instrumentation.
However, not all features of the OpenTelemetry API are supported when using this approach, and not all Elastic APM agents support this approach.
Find more details about how to use an OpenTelemetry API or SDK with an Elastic APM agent and which OpenTelemetry API features are supported in the APM agent documentation:
AWS Lambda functions can be instrumented with OpenTelemetry and monitored with Elastic Observability or Elastic Observability Serverless.
To get started, follow the official AWS Distribution for OpenTelemetry Lambda documentation, and configure the EDOT Collector in Gateway mode to send traces and metrics to your Elastic cluster: