From 7dc7b30405d691c1778c9565764f90d0d4df90e4 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Thu, 9 Mar 2023 07:33:18 -0800 Subject: [PATCH] Remove unneeded type argument from metric SDK (#3831) Co-authored-by: Chester Cheung --- sdk/metric/instrument.go | 4 ++-- sdk/metric/internal/histogram_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/metric/instrument.go b/sdk/metric/instrument.go index e6ab97c9f..33183d22e 100644 --- a/sdk/metric/instrument.go +++ b/sdk/metric/instrument.go @@ -219,7 +219,7 @@ var _ instrument.Float64ObservableGauge = float64Observable{} func newFloat64Observable(scope instrumentation.Scope, kind InstrumentKind, name, desc, u string, agg []internal.Aggregator[float64]) float64Observable { return float64Observable{ - observable: newObservable[float64](scope, kind, name, desc, u, agg), + observable: newObservable(scope, kind, name, desc, u, agg), } } @@ -234,7 +234,7 @@ var _ instrument.Int64ObservableGauge = int64Observable{} func newInt64Observable(scope instrumentation.Scope, kind InstrumentKind, name, desc, u string, agg []internal.Aggregator[int64]) int64Observable { return int64Observable{ - observable: newObservable[int64](scope, kind, name, desc, u, agg), + observable: newObservable(scope, kind, name, desc, u, agg), } } diff --git a/sdk/metric/internal/histogram_test.go b/sdk/metric/internal/histogram_test.go index 57f04560a..2a26270ea 100644 --- a/sdk/metric/internal/histogram_test.go +++ b/sdk/metric/internal/histogram_test.go @@ -135,7 +135,7 @@ func testHistImmutableBounds[N int64 | float64](newA func(aggregation.ExplicitBu } func TestHistogramImmutableBounds(t *testing.T) { - t.Run("Delta", testHistImmutableBounds[int64]( + t.Run("Delta", testHistImmutableBounds( NewDeltaHistogram[int64], func(a Aggregator[int64]) []float64 { deltaH := a.(*deltaHistogram[int64]) @@ -143,7 +143,7 @@ func TestHistogramImmutableBounds(t *testing.T) { }, )) - t.Run("Cumulative", testHistImmutableBounds[int64]( + t.Run("Cumulative", testHistImmutableBounds( NewCumulativeHistogram[int64], func(a Aggregator[int64]) []float64 { cumuH := a.(*cumulativeHistogram[int64])