otelzap

package module
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2021 License: BSD-2-Clause Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap added in v0.7.5

func Wrap(logger *zap.Logger, opts ...Option) *zap.Logger

Types

type Option

type Option interface {
	Apply(*OtelCore)
}

Option applies a configuration to the given config.

func WithErrorStatusLevel

func WithErrorStatusLevel(level zapcore.Level) Option

WithErrorStatusLevel sets the maximum logrus logging level on which the span status is set to codes.Error.

The default is <= logrus.ErrorLevel.

func WithLevel

func WithLevel(enab zapcore.LevelEnabler) Option

type OtelCore

type OtelCore struct {
	zapcore.LevelEnabler
	// contains filtered or unexported fields
}

func NewOtelCore

func NewOtelCore(opts ...Option) *OtelCore

func (*OtelCore) Check

func (*OtelCore) Sync

func (c *OtelCore) Sync() error

func (*OtelCore) With

func (c *OtelCore) With(fields []zapcore.Field) zapcore.Core

func (*OtelCore) Write

func (c *OtelCore) Write(ent zapcore.Entry, fields []zapcore.Field) error

Directories

Path Synopsis
example module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL