Documentation ¶
Index ¶
- func Debug(msg string, keysAndValues ...interface{})
- func Error(err error, msg string, keysAndValues ...interface{})
- func GetLogger() logr.Logger
- func Info(msg string, keysAndValues ...interface{})
- func MeterProvider() metric.MeterProvider
- func SetErrorHandler(h ErrorHandler)
- func SetLogger(l logr.Logger)
- func SetMeterProvider(mp metric.MeterProvider)
- func SetTextMapPropagator(p propagation.TextMapPropagator)
- func SetTracerProvider(tp trace.TracerProvider)
- func TextMapPropagator() propagation.TextMapPropagator
- func TracerProvider() trace.TracerProvider
- func Warn(msg string, keysAndValues ...interface{})
- type ErrDelegator
- type ErrorHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶ added in v1.3.0
func Debug(msg string, keysAndValues ...interface{})
Debug prints messages about all internal changes in the API or SDK.
func Info ¶ added in v1.3.0
func Info(msg string, keysAndValues ...interface{})
Info prints messages about the general state of the API or SDK. This should usually be less than 5 messages a minute.
func MeterProvider ¶
func MeterProvider() metric.MeterProvider
MeterProvider is the internal implementation for global.MeterProvider.
func SetErrorHandler ¶ added in v1.15.0
func SetErrorHandler(h ErrorHandler)
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.
func SetLogger ¶ added in v1.3.0
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`.
func SetMeterProvider ¶
func SetMeterProvider(mp metric.MeterProvider)
SetMeterProvider is the internal implementation for global.SetMeterProvider.
func SetTextMapPropagator ¶
func SetTextMapPropagator(p propagation.TextMapPropagator)
SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator.
func SetTracerProvider ¶
func SetTracerProvider(tp trace.TracerProvider)
SetTracerProvider is the internal implementation for global.SetTracerProvider.
func TextMapPropagator ¶
func TextMapPropagator() propagation.TextMapPropagator
TextMapPropagator is the internal implementation for global.TextMapPropagator.
func TracerProvider ¶
func TracerProvider() trace.TracerProvider
TracerProvider is the internal implementation for global.TracerProvider.
Types ¶
type ErrDelegator ¶ added in v1.15.0
type ErrDelegator struct {
// contains filtered or unexported fields
}
func (*ErrDelegator) Handle ¶ added in v1.15.0
func (d *ErrDelegator) Handle(err error)
type ErrorHandler ¶ added in v1.15.0
type ErrorHandler interface { // Handle handles any error deemed irremediable by an OpenTelemetry // component. Handle(error) }
ErrorHandler handles irremediable events.
func GetErrorHandler ¶ added in v1.15.0
func GetErrorHandler() ErrorHandler
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.