1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-14 10:13:10 +02:00
opentelemetry-go/api/metric/noop_meter.go

23 lines
417 B
Go
Raw Normal View History

package metric
import (
"context"
"go.opentelemetry.io/api/core"
)
type NoopMeter struct{}
type noopMetric struct{}
var _ Meter = NoopMeter{}
var _ Float64Gauge = noopMetric{}
func (NoopMeter) GetFloat64Gauge(ctx context.Context, gauge *Float64GaugeHandle, labels ...core.KeyValue) Float64Gauge {
return noopMetric{}
}
func (noopMetric) Set(ctx context.Context, value float64, labels ...core.KeyValue) {
}