Documentation ¶
Overview ¶
Package otelzap provides a bridge between the go.uber.org/zap and OpenTelemetry logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core is a zapcore.Core that sends logging records to OpenTelemetry.
func NewCore ¶
NewCore creates a new zapcore.Core that can be used with go.uber.org/zap.New.
func (*Core) Check ¶
func (o *Core) Check(ent zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry
Check determines whether the supplied Entry should be logged using core.Enabled method. If the entry should be logged, the Core adds itself to the CheckedEntry and returns the result.
func (*Core) Enabled ¶
Enabled decides whether a given logging level is enabled when logging a message.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures a Core.
func WithLoggerProvider ¶
func WithLoggerProvider(provider log.LoggerProvider) Option
WithLoggerProvider returns an Option that configures log.LoggerProvider used by a Core to create its log.Logger.
By default if this Option is not provided, the Handler will use the global LoggerProvider.
func WithSchemaURL ¶
WithSchemaURL returns an Option that configures the semantic convention schema URL of the log.Logger used by a Core. The schemaURL should be the schema URL for the semantic conventions used in log records.
func WithVersion ¶
WithVersion returns an Option that configures the version of the log.Logger used by a Core. The version should be the version of the package that is being logged.