You've already forked opentelemetry-go
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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user