1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-23 22:34:47 +02:00

chore: handle Float64Histogram in log/observe errMeter (#7555)

Calling other metrics from this meter provider should be a noop, not a
panic.
This fixes the test suite in
https://github.com/open-telemetry/opentelemetry-go/pull/7524
This commit is contained in:
Damien Mathieu
2025-10-31 21:55:01 +01:00
committed by GitHub
parent 5616ce4987
commit e308db8adf

View File

@@ -41,6 +41,10 @@ func (m *errMeter) Int64Counter(string, ...mapi.Int64CounterOption) (mapi.Int64C
return nil, m.err return nil, m.err
} }
func (m *errMeter) Float64Histogram(string, ...mapi.Float64HistogramOption) (mapi.Float64Histogram, error) {
return nil, m.err
}
const slpComponentID = 0 const slpComponentID = 0
func TestNewSLPError(t *testing.T) { func TestNewSLPError(t *testing.T) {