Histogram buckets do not adjust for unit #5891
Labels
blocked:specification
Waiting on clarification of the OpenTelemetry specification before progress can be made
bug
Something isn't working
invalid
This doesn't seem right
Description
When I create a histogram without
metric.WithUnit
, it creates a prometheus histogram with buckets[]float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000}
frommetric.DefaultAggregationSelector
I believe.But when I use
metric.WithUnit("s")
, the buckets do not re-adjust to account for this unit change. This should either be documented or handled by the SDK. For example: SDK handles naming in such case, i.e._milliseconds
or_seconds
.Environment
Expected behavior
When I use
metric.WithUnit("s")
which overrides the default Unit ms, it should adjust the buckets to[]float64{0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}
, if not set explicitly.The text was updated successfully, but these errors were encountered: