spanmetricsprocessor: Set resource attributes where possible #18502
Labels
connector/spanmetrics
enhancement
New feature or request
processor/spanmetrics
Span Metrics processor
Component(s)
processor/spanmetrics
Is your feature request related to a problem? Please describe.
I was using the
spanmetricsprocessor
withprometheusexporter
and was surprised to find theservice_name
as a label instead ofjob
.Digging deeper, this is because the processor only sets metric attributes but not resource attributes.
Describe the solution you'd like
I think we should set resource attributes if we are aggregating by a resource attribute.
For example, if we are aggregating by
service.name
andservice.instance.id
, the dimensions in the metrics emitted should be part of resource attributes and not metric attributes.Describe alternatives you've considered
Use the transform processor to move the metric attributes to resource attributes.
Additional context
No response
The text was updated successfully, but these errors were encountered: