Documentation
¶
Index ¶
- func NewCore(logger otellog.Logger, opts ...Option) zapcore.Core
- type Option
- type OtelZapCore
- func (o OtelZapCore) Check(entry zapcore.Entry, checked *zapcore.CheckedEntry) *zapcore.CheckedEntry
- func (o OtelZapCore) Enabled(level zapcore.Level) bool
- func (o OtelZapCore) Sync() error
- func (o OtelZapCore) With(fields []zapcore.Field) zapcore.Core
- func (o OtelZapCore) Write(entry zapcore.Entry, fields []zapcore.Field) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(c *OtelZapCore)
func WithLevelEnabler ¶
func WithLevelEnabler(levelEnabler zapcore.LevelEnabler) Option
WithLevelEnabler sets the zapcore.LevelEnabler for determining which log levels to export
type OtelZapCore ¶
type OtelZapCore struct {
// contains filtered or unexported fields
}
OtelZapCore is a zapcore.Core implementation that exports logs to OpenTelemetry It implements the zapcore.Core interface and uses OpenTelemetry's logging API
func (OtelZapCore) Check ¶
func (o OtelZapCore) Check(entry zapcore.Entry, checked *zapcore.CheckedEntry) *zapcore.CheckedEntry
Check checks if the given log entry is enabled for the OpenTelemetry Core
func (OtelZapCore) Enabled ¶
func (o OtelZapCore) Enabled(level zapcore.Level) bool
Enabled checks if the given log level is enabled for the OpenTelemetry Core
func (OtelZapCore) Sync ¶
func (o OtelZapCore) Sync() error
Click to show internal directories.
Click to hide internal directories.