Closed
Description
Component(s)
connector/signaltometrics
What happened?
Description
Component configuration allows declaring two metrics with same name and description but different histograms types. In such situation, the component only accounts for explicit bounds histogram (because it is handled first) and counts all the metrics twice.
Steps to Reproduce
Define a config like below:
signaltometrics:
spans:
- name: duplicate
description: Duplicate metric
unit: ms
histogram:
count: "Int(AdjustedCount())"
value: Milliseconds(end_time - start_time)
- name: duplicate
description: Duplicate metric
unit: ms
exponential_histogram:
count: "Int(AdjustedCount())"
value: Milliseconds(end_time - start_time)
Expected Result
Spans should be counted once and two metrics (exponential histogram and histogram) should be created.
Actual Result
Histogram metric is created and span is counted twice.
Collector version
v0.121.0 (all versions with signal to metrics component)
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
Additional context
No response