2020-03-23 22:41:10 -07: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 16:28:32 +01:00
|
|
|
package metric // import "go.opentelemetry.io/otel/metric"
|
2019-07-11 15:28:38 -07:00
|
|
|
|
2021-10-14 09:06:22 -07:00
|
|
|
type noopMeterProvider struct{}
|
2019-07-11 15:28:38 -07:00
|
|
|
|
2021-09-13 09:14:32 -07: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-11 15:28:38 -07:00
|
|
|
|
2021-09-13 09:14:32 -07:00
|
|
|
func (noopMeterProvider) Meter(instrumentationName string, opts ...MeterOption) Meter {
|
2020-05-11 20:29:06 -07:00
|
|
|
return Meter{}
|
2019-10-30 23:35:02 -07:00
|
|
|
}
|