2020-03-24 07:41:10 +02:00
|
|
|
// Copyright The OpenTelemetry Authors
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2020-11-12 17:28:32 +02:00
|
|
|
package metric // import "go.opentelemetry.io/otel/metric"
|
2019-07-12 00:28:38 +02:00
|
|
|
|
2021-10-14 18:06:22 +02:00
|
|
|
type noopMeterProvider struct{}
|
2019-07-12 00:28:38 +02:00
|
|
|
|
2021-09-13 18:14:32 +02:00
|
|
|
// NewNoopMeterProvider returns an implementation of MeterProvider that
|
|
|
|
// performs no operations. The Meter and Instrument created from the returned
|
|
|
|
// MeterProvider also perform no operations.
|
|
|
|
func NewNoopMeterProvider() MeterProvider {
|
|
|
|
return noopMeterProvider{}
|
|
|
|
}
|
|
|
|
|
|
|
|
var _ MeterProvider = noopMeterProvider{}
|
2019-07-12 00:28:38 +02:00
|
|
|
|
2021-09-13 18:14:32 +02:00
|
|
|
func (noopMeterProvider) Meter(instrumentationName string, opts ...MeterOption) Meter {
|
2020-05-12 05:29:06 +02:00
|
|
|
return Meter{}
|
2019-10-31 08:35:02 +02:00
|
|
|
}
|