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.
The receiver can be configured using the following settings:
endpointthe URI where this receiver can be contacted (default:0.0.0.0:8200)events_url_paththe path to the Events Intake V2 endpoint (default:/intake/v2/events)rum_events_url_paththe path to the RUM Events Intake V2 endpoint (default:/intake/v2/rum/events)max_event_size_bytesthe maximum size of an event in bytes (default:300KiB)batch_sizethe 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).
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.0Then build the binary:
$ ocb --config builder-config.yamlThis 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
durationattribute, without atimestampattribute. Traditionally, APM Server is in charge of setting thetimestampattribute elastic/apm-server#723. Equivalently, this receiver sets thetimestampattribute to the current time. -
Elastic APM Agents periodically poll APM Server for configuration changes. This receiver does not support this feature.
