Source File
metric.go
Belonging Package
go.opentelemetry.io/otel
// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package otel // import "go.opentelemetry.io/otel"import ()// Meter returns a Meter from the global MeterProvider. The name 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 name is empty, then a implementation defined default name will be// used instead.//// If this is called before a global MeterProvider is registered the returned// Meter will be a No-op implementation of a Meter. When a global MeterProvider// is registered for the first time, the returned Meter, and all the// instruments it has created or will create, are recreated automatically from// the new MeterProvider.//// This is short for GetMeterProvider().Meter(name).func ( string, ...metric.MeterOption) metric.Meter {return GetMeterProvider().Meter(, ...)}// GetMeterProvider returns the registered global meter provider.//// If no global GetMeterProvider has been registered, a No-op GetMeterProvider// implementation is returned. When a global GetMeterProvider is registered for// the first time, the returned GetMeterProvider, and all the Meters it has// created or will create, are recreated automatically from the new// GetMeterProvider.func () metric.MeterProvider {return global.MeterProvider()}// SetMeterProvider registers mp as the global MeterProvider.func ( metric.MeterProvider) {global.SetMeterProvider()}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |