Elastic APM Receiver
An experimental OpenTelemetry Collector receiver for Elastic APM trace data.
Elastic APM agents export telemetry data to Elastic APM Server via the Events Intake API.
With this receiver, agents can point to an OpenTelemetry Collector instance instead and export trace data to any backend supported by OpenTelemetry.
Metrics and logs are currently not supported.
This is a proof of concept. It is not intended for production use.
Getting Started
⚠️ This receiver must be built from source. See Build for instructions.
The receiver can be configured using the following settings:
endpoint
the URI where this receiver can be contacted (default: 0.0.0.0:8200
)
events_url_path
the path to the Events Intake V2 endpoint (default: /intake/v2/events
)
rum_events_url_path
the path to the RUM Events Intake V2 endpoint (default: /intake/v2/rum/events
)
max_event_size_bytes
the maximum size of an event in bytes (default: 300KiB
)
batch_size
the maximum number of events to process in a single batch (default: 10
)
See OTel Collector Server Configuration for more options (e.g. CORS, TLS, Headers, Auth).
Build
Use OpenTelemetry Collector Builder to build a binary with this receiver included.
Extend builder-config.yaml
to include a receiver configuration for the Elastic APM receiver. For example:
receivers:
- gomod: github.com/ldgrp/elasticapmreceiver v0.0.0
Then build the binary:
$ ocb --config builder-config.yaml
How it works
This receiver depends heavily on the latest elastic/apm-data
package to process incoming
requests and convert them into an APMEvent
struct. This struct is then converted
to an OpenTelemetry span and scheduled for export.
-
The Elastic APM RUM JS Agent exports transactions with a duration
attribute, without a timestamp
attribute.
Traditionally, APM Server is in charge of setting the timestamp
attribute https://github.com/elastic/apm-server/issues/723. Equivalently, this receiver sets the timestamp
attribute to the current time.
-
Elastic APM Agents periodically poll APM Server for configuration changes. This receiver does not support this feature.