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.

package metric

import (
	

	
)
The file is organized as follows: - Provider interface - Meter struct - RecordBatch - BatchObserver - Synchronous instrument constructors (2 x int64,float64) - Asynchronous instrument constructors (1 x int64,float64) - Batch asynchronous constructors (1 x int64,float64) - Internals
Provider supports named Meter instances.
Meter creates an implementation of the Meter interface. The instrumentationName must be the name of the library providing instrumentation. This name may be the same as the instrumented code only if that code provides built-in instrumentation. If the instrumentationName is empty, then a implementation defined default name will be used instead.
	Meter(instrumentationName string, opts ...MeterOption) Meter
}
Meter is the OpenTelemetry metric API, based on a `MeterImpl` implementation and the `Meter` library name. An uninitialized Meter is a no-op implementation.
RecordBatch atomically records a batch of measurements.
func ( Meter) ( context.Context,  []label.KeyValue,  ...Measurement) {
	if .impl == nil {
		return
	}
	.impl.RecordBatch(, , ...)
}
NewBatchObserver creates a new BatchObserver that supports making batches of observations for multiple instruments.
NewInt64Counter creates a new integer Counter instrument with the given name, customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64Counter creates a new floating point Counter with the given name, customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewInt64UpDownCounter creates a new integer UpDownCounter instrument with the given name, customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64UpDownCounter creates a new floating point UpDownCounter with the given name, customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewInt64ValueRecorder creates a new integer ValueRecorder instrument with the given name, customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64ValueRecorder creates a new floating point ValueRecorder with the given name, customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewInt64ValueObserver creates a new integer ValueObserver instrument with the given name, running a given callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64ValueObserver creates a new floating point ValueObserver with the given name, running a given callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewInt64SumObserver creates a new integer SumObserver instrument with the given name, running a given callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64SumObserver creates a new floating point SumObserver with the given name, running a given callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewInt64UpDownSumObserver creates a new integer UpDownSumObserver instrument with the given name, running a given callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64UpDownSumObserver creates a new floating point UpDownSumObserver with the given name, running a given callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewInt64ValueObserver creates a new integer ValueObserver instrument with the given name, running in a batch callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64ValueObserver creates a new floating point ValueObserver with the given name, running in a batch callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewInt64SumObserver creates a new integer SumObserver instrument with the given name, running in a batch callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64SumObserver creates a new floating point SumObserver with the given name, running in a batch callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewInt64UpDownSumObserver creates a new integer UpDownSumObserver instrument with the given name, running in a batch callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
NewFloat64UpDownSumObserver creates a new floating point UpDownSumObserver with the given name, running in a batch callback, and customized with options. May return an error if the name is invalid (e.g., empty) or improperly registered (e.g., duplicate registration).
MeterImpl returns the underlying MeterImpl of this Meter.
func ( Meter) () MeterImpl {
	return .impl
}
newAsync constructs one new asynchronous instrument.
func ( Meter) (
	 string,
	 Kind,
	 NumberKind,
	 []InstrumentOption,
	 AsyncRunner,
) (
	AsyncImpl,
	error,
) {
	if .impl == nil {
		return NoopAsync{}, nil
	}
	 := NewDescriptor(, , , ...)
	.config.InstrumentationName = .name
	.config.InstrumentationVersion = .version
	return .impl.NewAsyncInstrument(, )
}
newSync constructs one new synchronous instrument.
func ( Meter) (
	 string,
	 Kind,
	 NumberKind,
	 []InstrumentOption,
) (
	SyncImpl,
	error,
) {
	if .impl == nil {
		return NoopSync{}, nil
	}
	 := NewDescriptor(, , , ...)
	.config.InstrumentationName = .name
	.config.InstrumentationVersion = .version
	return .impl.NewSyncInstrument()