Skip to content

Same metric name, unit, and type with different description leads to incorrect description on the produced metric #39736

@lahsivjar

Description

@lahsivjar

Component(s)

connector/signaltometrics

What happened?

Description

If two metrics are defined with same metric name, unit, and type but with different descriptions then only the last description is used. This case is possible if we want to define metrics with different attributes or condition criteria. See steps to reproduce for examples.

Steps to Reproduce

Define signal to metrics connector with the following configuration:

spans:
    - name: metric.1
      description: Metric with resource.foo attribute
      unit: ms
      include_resource_attributes:
        - key: resource.foo
      histogram:
        value: Milliseconds(end_time - start_time)
    - name: with_resource_foo_only
      description: Metric with resource.bar attribute
      unit: ms
      include_resource_attributes:
        - key: resource.bar
      histogram:
        value: Milliseconds(end_time - start_time)

Expected Result

The above config should produce the metric with resource.foo resource attribute having description "Metric with resource.foo attribute" and the metric with resource.bar resource attribute having description "Metric with resource.bar attribute".

Actual Result

Metrics with both resource.foo as well as resource.bar attributes have the same description: "Metric with resource.bar attribute".

Collector version

v0.125.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions