Description
Using this counter:
counter, err := meter.Int64Counter(
"foo",
otelmetric.WithDescription("a simple counter with unit 1"),
otelmetric.WithUnit("1"),
)
In prometheus exporter v0.57 it produced the metric foo_ratio_total vs
in prometheus exporter v0.60 in produces the metric foo_total
Environment
- OS: linux
- Architecture: any
- Go Version: 1.24.2
- opentelemetry-go version: [>= 1.37.0 / prometheus exporter >= 0.59.1]
Steps To Reproduce
I've added a sample test over the 0.57.0 tag here
The addapted test for it to pass over 0.60.0 tag is here.
The adaptations for it to pass in 0.60.0 can be viewed in this commit
Expected behavior
Was this an intentional change?
I know the foo_ratio_total is not really nice, and there is a discussion in the comunity to remove the ratio for counters, but it introduces backwards incompatibility for such metrics.
The spec hasn't been updated yet, although I see it is an accepted proposal.
Description
Using this counter:
In prometheus exporter v0.57 it produced the metric foo_ratio_total vs
in prometheus exporter v0.60 in produces the metric foo_total
Environment
Steps To Reproduce
I've added a sample test over the 0.57.0 tag here
The addapted test for it to pass over 0.60.0 tag is here.
The adaptations for it to pass in 0.60.0 can be viewed in this commit
Expected behavior
Was this an intentional change?
I know the
foo_ratio_totalis not really nice, and there is a discussion in the comunity to remove theratiofor counters, but it introduces backwards incompatibility for such metrics.The spec hasn't been updated yet, although I see it is an accepted proposal.