Skip to content

Add OTLP metrics endpoint #133057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

felixbarny
Copy link
Member

@felixbarny felixbarny commented Aug 18, 2025

Adds an OTLP endpoint for metric ingestion into TSDB.

This simplifies getting data into TSDB as configuration of mappings and dimensions isn't required. It also improves ingestion performance. Partly due to the binary encoding but also because it can re-use partial TsidBuilders for common resource attributes.

My aim was to retain exactly the same semantics and behavior as the OTel collector's Elasticsearch exporter, including data stream routing and mapping hints.

Depends on

To review, select from the 3rd commit (a46882e) onwards
Note that I might force-push to the branch once the PRs this depends on get merged.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@elasticsearchmachine elasticsearchmachine added the external-contributor Pull request authored by a developer outside the Elasticsearch team label Aug 18, 2025
@ruflin
Copy link
Contributor

ruflin commented Aug 18, 2025

Did a quick test, and so far seems to be working as expected. For everyone that needs a config to do a quick test run with the otel collector:

receivers:
  hostmetrics:
    collection_interval: 10s
    scrapers:
      cpu:
      disk:
      load:
      filesystem:
      memory:
      network:
      #process:
      paging:

processors:
  batch:


exporters:
  otlphttp/elasticsearch:
    compression: gzip
    encoding: proto
    endpoint: http://localhost:9200/_otlp
    sending_queue:
      enabled: true
      block_on_overflow: true
      queue_size: 10
      num_consumers: 10

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: [batch]
      exporters: [otlphttp/elasticsearch] # only use with batch processor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor Pull request authored by a developer outside the Elasticsearch team :StorageEngine/TSDB You know, for Metrics Team:StorageEngine v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants