registry

package
v0.0.0-...-a1b153e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMetricKindMismatch = fmt.Errorf(
	"A metric was already registered by this name with another kind or number type")

ErrMetricKindMismatch is the standard error for mismatched metric instrument definitions.

Functions

func Compatible

func Compatible(candidate, existing metric.Descriptor) bool

Compatible determines whether two metric.Descriptors are considered the same for the purpose of uniqueness checking.

func NewMetricKindMismatchError

func NewMetricKindMismatchError(desc metric.Descriptor) error

NewMetricKindMismatchError formats an error that describes a mismatched metric instrument definition.

func NewUniqueInstrumentMeterImpl

func NewUniqueInstrumentMeterImpl(impl metric.MeterImpl) metric.MeterImpl

NewUniqueInstrumentMeterImpl returns a wrapped metric.MeterImpl with the addition of uniqueness checking.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is a standard metric.Provider for wrapping `MeterImpl`

func NewProvider

func NewProvider(impl metric.MeterImpl) *Provider

NewProvider returns a new provider that implements instrument name-uniqueness checking.

func (*Provider) Meter

func (p *Provider) Meter(instrumentationName string, opts ...metric.MeterOption) metric.Meter

Meter implements metric.Provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL