Documentation ¶
Index ¶
- func Handle(err error)
- func Handler() oterror.Handler
- func Meter(instrumentationName string, opts ...metric.MeterOption) metric.Meter
- func MeterProvider() metric.Provider
- func Propagators() propagation.Propagators
- func SetHandler(h oterror.Handler)
- func SetMeterProvider(mp metric.Provider)
- func SetPropagators(p propagation.Propagators)
- func SetTraceProvider(tp trace.Provider)
- func TraceProvider() trace.Provider
- func Tracer(name string) trace.Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler returns the global Handler instance. If no Handler instance has be explicitly set yet, a default Handler is returned that logs to STDERR until an Handler is set (all functionality is delegated to the set Handler once it is set).
func Meter ¶
func Meter(instrumentationName string, opts ...metric.MeterOption) metric.Meter
Meter creates an implementation of the Meter interface from the global Provider. 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.
This is short for MeterProvider().Meter(name)
func MeterProvider ¶
MeterProvider returns the registered global meter provider. If none is registered then a default meter provider is returned that forwards the Meter interface to the first registered Meter.
Use the meter provider to create a named meter. E.g.
meter := global.MeterProvider().Meter("example.com/foo")
or
meter := global.Meter("example.com/foo")
func Propagators ¶
func Propagators() propagation.Propagators
Propagators returns the registered global propagators instance. If none is registered then an instance of propagators.NoopPropagators is returned.
func SetMeterProvider ¶
SetMeterProvider registers `mp` as the global meter provider.
func SetPropagators ¶
func SetPropagators(p propagation.Propagators)
SetPropagators registers `p` as the global propagators instance.
func SetTraceProvider ¶
SetTraceProvider registers `tp` as the global trace provider.
func TraceProvider ¶
TraceProvider returns the registered global trace provider. If none is registered then an instance of trace.NoopProvider is returned.
Use the trace provider to create a named tracer. E.g.
tracer := global.TraceProvider().Tracer("example.com/foo")
or
tracer := global.Tracer("example.com/foo")
Types ¶
This section is empty.