1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

Revert "Move metric No-Op to metric/noop (#3893)" (#3921)

* Revert "Move metric No-Op to `metric/noop` (#3893)"

This reverts commit 3c75a44f84.

* Persist removal of NewNoopMeter
This commit is contained in:
Tyler Yahn
2023-03-22 14:41:28 -07:00
committed by GitHub
parent e4cc478c02
commit 795ad97119
10 changed files with 222 additions and 451 deletions

View File

@@ -20,7 +20,6 @@ import (
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/noop"
)
type testMeterProvider struct{}
@@ -28,12 +27,12 @@ type testMeterProvider struct{}
var _ metric.MeterProvider = &testMeterProvider{}
func (*testMeterProvider) Meter(_ string, _ ...metric.MeterOption) metric.Meter {
return noop.NewMeterProvider().Meter("")
return metric.NewNoopMeterProvider().Meter("")
}
func TestMultipleGlobalMeterProvider(t *testing.T) {
p1 := testMeterProvider{}
p2 := noop.NewMeterProvider()
p2 := metric.NewNoopMeterProvider()
SetMeterProvider(&p1)
SetMeterProvider(p2)