Skip to content

Conversation

ericywl
Copy link
Contributor

@ericywl ericywl commented Apr 25, 2025

This PR adds a new page under APM OTel to describe data stream routing.

Closes elastic/apm-server#16204.

@ericywl ericywl requested review from carsonip and theletterf April 25, 2025 06:16
@ericywl ericywl self-assigned this Apr 25, 2025
Copy link
Contributor

@theletterf theletterf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass. How would you see moving this content inside https://www.elastic.co/docs/solutions/observability/apm/data-streams ?

@ericywl
Copy link
Contributor Author

ericywl commented Apr 25, 2025

How would you see moving this content inside https://www.elastic.co/docs/solutions/observability/apm/data-streams?

I thought about it, but since this is specific to OTel, I wasn't sure if that was the appropriate place.

Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
@theletterf
Copy link
Contributor

Let's keep it separate for now then. Thanks Erik!

@theletterf theletterf merged commit c92d1a5 into main Apr 25, 2025
3 checks passed
@theletterf theletterf deleted the add-data-stream-routing branch April 25, 2025 09:50

To automatically route OTLP data, set the `data_stream.dataset` and `data_stream.namespace` attributes. These attributes map to the respective [ECS fields](ecs://reference/ecs-data_stream.md).

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resource level, scope level, span level, or span event level

Not entirely accurate. It works at resource level, scope level, and record level (span, span event, log record, data point)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carsonip Feel free to open a small patch and I'll merge

ericywl added a commit that referenced this pull request Apr 28, 2025
Apply suggestion from
#1260 (comment).

Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Describe OTel data stream attribute routing

3 participants