Data stream routing
Elastic Stack Serverless
Elastic APM supports routing APM data to user-defined data stream names using the reroute
processor. However, you can also ingest OTLP data without having to create new ingest pipelines.
To automatically route OTLP data, set the data_stream.dataset
and data_stream.namespace
attributes. These attributes map to the respective ECS fields.
You can set the data_stream
attributes at resource level, scope level, span level, or span event level. Elastic parses the attributes in increasing order of precedence. For example, span event data_stream
attributes override the span data_stream
attributes. This implies that data_stream
attributes are inherited from previous levels. If a span doesn't specify data_stream
attributes, it uses the scope attributes.
For guidance on how to set resource attributes in OpenTelemetry, refer to setting resource attributes.