RousselTMLEARNING

Article · Elasticsearch: from discovery to expertise

OpenTelemetry and Elasticsearch: compatibility and architecture

1. Elasticsearch and OpenTelemetry #

Compatibility that became native.

Context #

OpenTelemetry (OTel) is the open standard for collecting traces, metrics and logs. Elastic donated its ECS schema to the project in 2023 to converge with OTel semantic conventions, then made Elasticsearch able to store OTel data as is, without conversion, and publishes its own EDOT distribution (Elastic Distribution of OpenTelemetry: Collector and SDKs).

Depending on the version: native OTel storage arrived in preview with Elastic 8.16 and became general in 9.x; the managed OTLP endpoint is offered on Elastic Cloud (Serverless, then Hosted). Check your version's compatibility matrix.

Three paths #

Collector, managed OTLP endpoint or APM Server.
PathStorageWhen
Collector (EDOT or contrib) + elasticsearch exporterNative OTel (or ECS)Self-hosted, full pipeline control
Managed OTLP endpointNative OTelElastic Cloud: nothing to operate on the receiving side
APM Server (OTLP)Converted to ECSExisting Elastic APM, classic APM agents

2. Storage and data streams #

Native OTel or ECS.

Storage modes #

otel mode, ecs mode and data streams.

In otel mode, resource attributes stay under resource.attributes.* and signal attributes under attributes.*: existing OpenTelemetry queries and dashboards apply directly. ecs mode translates to ECS fields (service.name, host.name), useful to reuse historical Elastic dashboards.

Reference configuration #

receivers:
  otlp:
    protocols:
      grpc: { endpoint: 0.0.0.0:4317 }
      http: { endpoint: 0.0.0.0:4318 }
processors:
  batch: {}
  resource:
    attributes:
      - { key: deployment.environment, value: lab, action: upsert }
exporters:
  elasticsearch:
    endpoint: https://es.exemple.fr:9200
    api_key: ${env:ES_API_KEY}
    mapping:
      mode: otel
service:
  pipelines:
    traces:  { receivers: [otlp], processors: [resource, batch], exporters: [elasticsearch] }
    metrics: { receivers: [otlp], processors: [resource, batch], exporters: [elasticsearch] }
    logs:    { receivers: [otlp], processors: [resource, batch], exporters: [elasticsearch] }
Good practice: Create an API key dedicated to the Collector, limited to writing to logs-*, metrics-* and traces-*.

3. Kibana and OpenTelemetry #

Exploring the data.

Where to see the data #

  • Discover and ES|QL on *.otel-* data streams.
  • APM / Observability apps: services, traces, service map (with APM metrics computed by the EDOT Collector).
  • Dashboards and alerts on OTel metrics.
FROM traces-*.otel-*
| WHERE resource.attributes.service.name == "checkout"
| STATS p95 = PERCENTILE(duration, 95) BY name
| SORT p95 DESC | LIMIT 10
Common mistake: Using the contrib Collector without Elastic's APM connector or processor: traces are stored, but Kibana's APM views (latency, throughput, error rate per service) stay empty. The EDOT distribution includes these components.

📄 OpenTelemetry and Elasticsearch: compatibility and architecture →

My progress

  • ⏱ Estimated time : ≈ 6 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

RBAC (Role-Based Access Control)

An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.

Authentication

The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).

Authorization

The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.

API Key

A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).

Architecture

The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.

Repository

A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...

Elasticsearch

A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.

Recommended Articles

OpenTelemetry traces in Elasticsearch and Kibana APM

Instrument applications with OpenTelemetry or EDOT SDKs, send traces to Elasticsearch, get Kibana...

Ingesting OpenTelemetry logs into Elasticsearch

Collect and structure logs with the OpenTelemetry Collector (filelog receiver, operators, transfo...

OpenTelemetry metrics in Elasticsearch

Collect host, Kubernetes and application metrics with OpenTelemetry, understand temporality and t...

Standalone Elastic Agent, Logstash and Kafka outputs, and OpenTelemetry (EDOT)

Write a standalone configuration, ship to Logstash or Kafka, and use Elastic Agent as an OpenTele...

OpenTelemetry architecture: understanding the 3 levels

A deep dive into the OpenTelemetry architecture. Learn how data flows from the application to the...

Logstash: managing plugins and adopting Elastic Common Schema (ECS)

Written version of the video lessons: list, install, update and bundle Logstash plugins offline; ...

Elastic Observability: logs, infrastructure, APM and synthetics

Elastic Observability features: log exploration, infrastructure inventory with Elastic Agent and ...

Elasticsearch distributed architecture: node roles, shards, replicas and allocation

Understand how Elasticsearch works as a distributed system: node roles, master nodes and quorum, ...

Understanding the Elastic Common Schema (ECS)

As always in our consulting engagements, we recommend that companies harmonise and standardise: k...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!