Documentation ¶
Index ¶
- Constants
- Variables
- type AtrEncoder
- func (a *AtrEncoder) AddArray(key string, arr zapcore.ArrayMarshaler) error
- func (a *AtrEncoder) AddBinary(key string, value []byte)
- func (a *AtrEncoder) AddBool(key string, value bool)
- func (a *AtrEncoder) AddByteString(key string, value []byte)
- func (a *AtrEncoder) AddComplex128(key string, value complex128)
- func (a *AtrEncoder) AddComplex64(key string, value complex64)
- func (a *AtrEncoder) AddDuration(key string, value time.Duration)
- func (a *AtrEncoder) AddFloat32(key string, value float32)
- func (a *AtrEncoder) AddFloat64(key string, value float64)
- func (a *AtrEncoder) AddInt(key string, value int)
- func (a *AtrEncoder) AddInt16(key string, value int16)
- func (a *AtrEncoder) AddInt32(key string, value int32)
- func (a *AtrEncoder) AddInt64(key string, value int64)
- func (a *AtrEncoder) AddInt8(key string, value int8)
- func (a *AtrEncoder) AddObject(key string, obj zapcore.ObjectMarshaler) error
- func (a *AtrEncoder) AddReflected(key string, value interface{}) error
- func (a *AtrEncoder) AddString(key, value string)
- func (a *AtrEncoder) AddTime(key string, value time.Time)
- func (a *AtrEncoder) AddUint(key string, value uint)
- func (a *AtrEncoder) AddUint16(key string, value uint16)
- func (a *AtrEncoder) AddUint32(key string, value uint32)
- func (a *AtrEncoder) AddUint64(key string, value uint64)
- func (a *AtrEncoder) AddUint8(key string, value uint8)
- func (a *AtrEncoder) AddUintptr(key string, value uintptr)
- func (a *AtrEncoder) Clone(fields []zapcore.Field) *AtrEncoder
- func (a *AtrEncoder) EncodeEntry(entry zapcore.Entry, fields []zapcore.Field) ([]byte, []attribute.KeyValue, error)
- func (a *AtrEncoder) OpenNamespace(key string)
- type Core
- type ObjectEncoder
- func (o *ObjectEncoder) AddArray(key string, arr zapcore.ArrayMarshaler) error
- func (o *ObjectEncoder) AddBinary(key string, value []byte)
- func (o *ObjectEncoder) AddBool(key string, value bool)
- func (o *ObjectEncoder) AddByteString(key string, value []byte)
- func (o *ObjectEncoder) AddComplex128(key string, value complex128)
- func (o *ObjectEncoder) AddComplex64(key string, value complex64)
- func (o *ObjectEncoder) AddDuration(key string, value time.Duration)
- func (o *ObjectEncoder) AddFloat32(key string, value float32)
- func (o *ObjectEncoder) AddFloat64(key string, value float64)
- func (o ObjectEncoder) AddInt(key string, value int)
- func (o ObjectEncoder) AddInt16(key string, value int16)
- func (o ObjectEncoder) AddInt32(key string, value int32)
- func (o *ObjectEncoder) AddInt64(key string, value int64)
- func (o *ObjectEncoder) AddInt8(key string, value int8)
- func (o *ObjectEncoder) AddObject(key string, marshaler zapcore.ObjectMarshaler) error
- func (o *ObjectEncoder) AddReflected(key string, value interface{}) error
- func (o *ObjectEncoder) AddString(key, value string)
- func (o *ObjectEncoder) AddTime(key string, value time.Time)
- func (o *ObjectEncoder) AddUint(key string, value uint)
- func (o *ObjectEncoder) AddUint16(key string, value uint16)
- func (o *ObjectEncoder) AddUint32(key string, value uint32)
- func (o *ObjectEncoder) AddUint64(key string, value uint64)
- func (o *ObjectEncoder) AddUint8(key string, value uint8)
- func (o *ObjectEncoder) AddUintptr(key string, value uintptr)
- func (o *ObjectEncoder) Clone(fields []zapcore.Field) *ObjectEncoder
- func (o *ObjectEncoder) EncodeEntry(entry zapcore.Entry, fields []zapcore.Field) ([]byte, error)
- func (o *ObjectEncoder) OpenNamespace(key string)
Constants ¶
View Source
const ( LevelKey = "level" CallerKey = "_caller" MessageKey = "msg" StacktraceKey = "stack" )
Variables ¶
View Source
var (
// Get retrieves a buffer from the pool, creating one if necessary.
Get = _pool.Get
)
Functions ¶
This section is empty.
Types ¶
type AtrEncoder ¶
type AtrEncoder struct {
// contains filtered or unexported fields
}
func NewAttr ¶
func NewAttr(attr ...attribute.KeyValue) *AtrEncoder
func (*AtrEncoder) AddArray ¶
func (a *AtrEncoder) AddArray(key string, arr zapcore.ArrayMarshaler) error
func (*AtrEncoder) AddBinary ¶
func (a *AtrEncoder) AddBinary(key string, value []byte)
func (*AtrEncoder) AddBool ¶
func (a *AtrEncoder) AddBool(key string, value bool)
func (*AtrEncoder) AddByteString ¶
func (a *AtrEncoder) AddByteString(key string, value []byte)
func (*AtrEncoder) AddComplex128 ¶
func (a *AtrEncoder) AddComplex128(key string, value complex128)
func (*AtrEncoder) AddComplex64 ¶
func (a *AtrEncoder) AddComplex64(key string, value complex64)
func (*AtrEncoder) AddDuration ¶
func (a *AtrEncoder) AddDuration(key string, value time.Duration)
func (*AtrEncoder) AddFloat32 ¶
func (a *AtrEncoder) AddFloat32(key string, value float32)
func (*AtrEncoder) AddFloat64 ¶
func (a *AtrEncoder) AddFloat64(key string, value float64)
func (*AtrEncoder) AddInt ¶
func (a *AtrEncoder) AddInt(key string, value int)
func (*AtrEncoder) AddInt16 ¶
func (a *AtrEncoder) AddInt16(key string, value int16)
func (*AtrEncoder) AddInt32 ¶
func (a *AtrEncoder) AddInt32(key string, value int32)
func (*AtrEncoder) AddInt64 ¶
func (a *AtrEncoder) AddInt64(key string, value int64)
func (*AtrEncoder) AddInt8 ¶
func (a *AtrEncoder) AddInt8(key string, value int8)
func (*AtrEncoder) AddObject ¶
func (a *AtrEncoder) AddObject(key string, obj zapcore.ObjectMarshaler) error
func (*AtrEncoder) AddReflected ¶
func (a *AtrEncoder) AddReflected(key string, value interface{}) error
func (*AtrEncoder) AddString ¶
func (a *AtrEncoder) AddString(key, value string)
AddString has multi-line issue
func (*AtrEncoder) AddUint ¶
func (a *AtrEncoder) AddUint(key string, value uint)
func (*AtrEncoder) AddUint16 ¶
func (a *AtrEncoder) AddUint16(key string, value uint16)
func (*AtrEncoder) AddUint32 ¶
func (a *AtrEncoder) AddUint32(key string, value uint32)
func (*AtrEncoder) AddUint64 ¶
func (a *AtrEncoder) AddUint64(key string, value uint64)
func (*AtrEncoder) AddUint8 ¶
func (a *AtrEncoder) AddUint8(key string, value uint8)
func (*AtrEncoder) AddUintptr ¶
func (a *AtrEncoder) AddUintptr(key string, value uintptr)
func (*AtrEncoder) Clone ¶
func (a *AtrEncoder) Clone(fields []zapcore.Field) *AtrEncoder
func (*AtrEncoder) EncodeEntry ¶
func (*AtrEncoder) OpenNamespace ¶
func (a *AtrEncoder) OpenNamespace(key string)
OpenNamespace not used, for json flow only
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core is ZapCore module transpile zap fields into logfmt format for Grafana Loki Using Otel Exstractor
func NewCore ¶
func NewCore(ex logskd.LogProcessor) *Core
NewCore create zap Core instance which transcede logfmt for Grafana Loki
func (*Core) Check ¶
func (c *Core) Check(ent zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry
type ObjectEncoder ¶
ObjectEncoder used only for loki export
func New ¶
func New(buf []byte) *ObjectEncoder
func (*ObjectEncoder) AddArray ¶
func (o *ObjectEncoder) AddArray(key string, arr zapcore.ArrayMarshaler) error
func (*ObjectEncoder) AddBinary ¶
func (o *ObjectEncoder) AddBinary(key string, value []byte)
func (*ObjectEncoder) AddBool ¶
func (o *ObjectEncoder) AddBool(key string, value bool)
func (*ObjectEncoder) AddByteString ¶
func (o *ObjectEncoder) AddByteString(key string, value []byte)
func (*ObjectEncoder) AddComplex128 ¶
func (o *ObjectEncoder) AddComplex128(key string, value complex128)
func (*ObjectEncoder) AddComplex64 ¶
func (o *ObjectEncoder) AddComplex64(key string, value complex64)
func (*ObjectEncoder) AddDuration ¶
func (o *ObjectEncoder) AddDuration(key string, value time.Duration)
func (*ObjectEncoder) AddFloat32 ¶
func (o *ObjectEncoder) AddFloat32(key string, value float32)
func (*ObjectEncoder) AddFloat64 ¶
func (o *ObjectEncoder) AddFloat64(key string, value float64)
func (ObjectEncoder) AddInt ¶
func (o ObjectEncoder) AddInt(key string, value int)
func (ObjectEncoder) AddInt16 ¶
func (o ObjectEncoder) AddInt16(key string, value int16)
func (ObjectEncoder) AddInt32 ¶
func (o ObjectEncoder) AddInt32(key string, value int32)
func (*ObjectEncoder) AddInt64 ¶
func (o *ObjectEncoder) AddInt64(key string, value int64)
func (*ObjectEncoder) AddInt8 ¶
func (o *ObjectEncoder) AddInt8(key string, value int8)
func (*ObjectEncoder) AddObject ¶
func (o *ObjectEncoder) AddObject(key string, marshaler zapcore.ObjectMarshaler) error
func (*ObjectEncoder) AddReflected ¶
func (o *ObjectEncoder) AddReflected(key string, value interface{}) error
func (*ObjectEncoder) AddString ¶
func (o *ObjectEncoder) AddString(key, value string)
func (*ObjectEncoder) AddUint ¶
func (o *ObjectEncoder) AddUint(key string, value uint)
func (*ObjectEncoder) AddUint16 ¶
func (o *ObjectEncoder) AddUint16(key string, value uint16)
func (*ObjectEncoder) AddUint32 ¶
func (o *ObjectEncoder) AddUint32(key string, value uint32)
func (*ObjectEncoder) AddUint64 ¶
func (o *ObjectEncoder) AddUint64(key string, value uint64)
func (*ObjectEncoder) AddUint8 ¶
func (o *ObjectEncoder) AddUint8(key string, value uint8)
func (*ObjectEncoder) AddUintptr ¶
func (o *ObjectEncoder) AddUintptr(key string, value uintptr)
func (*ObjectEncoder) Clone ¶
func (o *ObjectEncoder) Clone(fields []zapcore.Field) *ObjectEncoder
func (*ObjectEncoder) EncodeEntry ¶
func (*ObjectEncoder) OpenNamespace ¶
func (o *ObjectEncoder) OpenNamespace(key string)
Click to show internal directories.
Click to hide internal directories.