-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Histogram buckets do not adjust for unit #5891
Copy link
Copy link
Open
Labels
blocked:specificationWaiting on clarification of the OpenTelemetry specification before progress can be madeWaiting on clarification of the OpenTelemetry specification before progress can be madedocumentationProvides helpful informationProvides helpful informationhelp wantedExtra attention is neededExtra attention is needed
Metadata
Metadata
Assignees
Labels
blocked:specificationWaiting on clarification of the OpenTelemetry specification before progress can be madeWaiting on clarification of the OpenTelemetry specification before progress can be madedocumentationProvides helpful informationProvides helpful informationhelp wantedExtra attention is neededExtra attention is needed
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.DefaultAggregationSelectorI 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._millisecondsor_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.