1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-27 22:49:15 +02:00

Add WithExplicitBucketBoundaries Histogram option to the metric api (#4603)

* Add WithExplicitBucketBoundaries Histogram option to the metric api

* Add note that the option is advisory

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
This commit is contained in:
David Ashpole
2023-10-26 13:18:37 -04:00
committed by GitHub
parent cdd9353641
commit 0f5565af4f
7 changed files with 53 additions and 4 deletions

View File

@@ -51,3 +51,9 @@ type float64Config interface {
Description() string
Unit() string
}
func TestFloat64ExplicitBucketHistogramConfiguration(t *testing.T) {
bounds := []float64{0.1, 0.5, 1.0}
got := NewFloat64HistogramConfig(WithExplicitBucketBoundaries(bounds...))
assert.Equal(t, bounds, got.ExplicitBucketBoundaries(), "boundaries")
}