Description
What are you trying to achieve?
I would like to be able to enrich my telemetry using members encoded inside the Baggage
header. The idea is to enable an "end-to-end telemetry correlation" use case by leveraging Context
and Baggage
.
This is easy to do using the Trace SDK by leveraging the SpanProcessor. Concrete implementations exist, such as the one for Go.
Furthermore, a similar concept exists in the Logs SDK - the LogRecordProcessor. Similarly, there seem to exist concrete implementations.
What did you expect to see?
According to the Design Goals of Metrics Specification, enriching metrics attributes via Baggage
and Context
is a top priority:
Being able to connect metrics to other signals. For example, metrics and traces can be correlated via exemplars, and metrics attributes can be enriched via Baggage and Context. Additionally, Resource can be applied to logs/metrics/traces in a consistent way.
Based on the quote above, I expected to see a similar "processor" concept for Metrics SDK, but that doesn't seem to be the case.
Additional context.
Even though the "processor" concept isn't fully materialized, some evidence exists in the form of implementation, namely in the opentelemetry-java
project. It looks like View
s can accept a set of AttributesProcessor
s (see here). Moreover, there even exists an implementation of a processor that extracts baggage members and attaches them as attributes (see here). Nevertheless, this feature is marked as experimental.
Related Issues.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status