example/prometheus
: histogram has only +Inf buckets
#2419
Labels
Projects
example/prometheus
: histogram has only +Inf buckets
#2419
Description
The Prometheus example is a bit confusing, with three histogram measurements resulting in only two buckets (2x +Inf), each with a value of
1
:Reading the code, I would expect multiple buckets, some of them perhaps empty. Turns out,
config.DefaultHistogramBoundaries
is an empty list of values:opentelemetry-go/example/prometheus/main.go
Lines 41 to 50 in f1971b3
Changing the example so that the first param to the factory is
selector.NewWithHistogramDistribution()
results in the following, which is already closer to my expectation:Perhaps the example could show how to specify explicit buckets. For instance, by changing the original example to have the following config:
This would result in the following buckets:
Environment
Steps To Reproduce
The text was updated successfully, but these errors were encountered: