package global
Import Path
go.opentelemetry.io/otel/internal/global (on go.dev)
Dependency Relation
imports 18 packages, and imported by 7 packages
Involved Source Files
Package global provides the OpenTelemetry global API.
instruments.go
internal_logging.go
meter.go
propagator.go
state.go
trace.go
Package-Level Type Names (total 2)
(*ErrDelegator) Handle(err error)
*ErrDelegator : ErrorHandler
*ErrDelegator : go.opentelemetry.io/otel.ErrorHandler
ErrorHandler handles irremediable events.
Handle handles any error deemed irremediable by an OpenTelemetry
component.
*ErrDelegator
go.opentelemetry.io/otel.ErrorHandler (interface)
go.opentelemetry.io/otel.ErrorHandlerFunc
ErrorHandler : go.opentelemetry.io/otel.ErrorHandler
func GetErrorHandler() ErrorHandler
func SetErrorHandler(h ErrorHandler)
Package-Level Functions (total 14)
Debug prints messages about all internal changes in the API or SDK.
Error prints messages about exceptional states of the API or SDK.
GetErrorHandler returns the global ErrorHandler instance.
The default ErrorHandler instance returned will log all errors to STDERR
until an override ErrorHandler is set with SetErrorHandler. All
ErrorHandler returned prior to this will automatically forward errors to
the set instance instead of logging.
Subsequent calls to SetErrorHandler after the first will not forward errors
to the new ErrorHandler for prior returned instances.
GetLogger returns the global logger.
Info prints messages about the general state of the API or SDK.
This should usually be less than 5 messages a minute.
MeterProvider is the internal implementation for global.MeterProvider.
SetErrorHandler sets the global ErrorHandler to h.
The first time this is called all ErrorHandler previously returned from
GetErrorHandler will send errors to h instead of the default logging
ErrorHandler. Subsequent calls will set the global ErrorHandler, but not
delegate errors to h.
SetLogger sets the global Logger to l.
To see Warn messages use a logger with `l.V(1).Enabled() == true`
To see Info messages use a logger with `l.V(4).Enabled() == true`
To see Debug messages use a logger with `l.V(8).Enabled() == true`.
SetMeterProvider is the internal implementation for global.SetMeterProvider.
SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator.
SetTracerProvider is the internal implementation for global.SetTracerProvider.
TextMapPropagator is the internal implementation for global.TextMapPropagator.
TracerProvider is the internal implementation for global.TracerProvider.
Warn prints messages about warnings in the API or SDK.
Not an error but is likely more important than an informational event.
![]() |
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. |