You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-29 23:07:45 +02:00
Implement WithExplicitBucketBoundaries option in the metric SDK (#4605)
This commit is contained in:
@@ -146,7 +146,8 @@ func testDefaultViewImplicit[N int64 | float64]() func(t *testing.T) {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
var c cache[string, instID]
|
||||
i := newInserter[N](test.pipe, &c)
|
||||
got, err := i.Instrument(inst)
|
||||
readerAggregation := i.readerDefaultAggregation(inst.Kind)
|
||||
got, err := i.Instrument(inst, readerAggregation)
|
||||
require.NoError(t, err)
|
||||
assert.Len(t, got, 1, "default view not applied")
|
||||
for _, in := range got {
|
||||
@@ -372,7 +373,8 @@ func TestInserterCachedAggregatorNameConflict(t *testing.T) {
|
||||
pipe := newPipeline(nil, NewManualReader(), nil)
|
||||
i := newInserter[int64](pipe, &vc)
|
||||
|
||||
_, origID, err := i.cachedAggregator(scope, kind, stream)
|
||||
readerAggregation := i.readerDefaultAggregation(kind)
|
||||
_, origID, err := i.cachedAggregator(scope, kind, stream, readerAggregation)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Len(t, pipe.aggregations, 1)
|
||||
@@ -382,7 +384,7 @@ func TestInserterCachedAggregatorNameConflict(t *testing.T) {
|
||||
require.Equal(t, name, iSync[0].name)
|
||||
|
||||
stream.Name = "RequestCount"
|
||||
_, id, err := i.cachedAggregator(scope, kind, stream)
|
||||
_, id, err := i.cachedAggregator(scope, kind, stream, readerAggregation)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, origID, id, "multiple aggregators for equivalent name")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user