diff --git a/bridges/otelzap/core.go b/bridges/otelzap/core.go index 8a1b80ade7e..da506616ed5 100644 --- a/bridges/otelzap/core.go +++ b/bridges/otelzap/core.go @@ -101,7 +101,7 @@ func NewCore(name string, opts ...Option) *Core { } } -// LevelEnabler decides whether a given logging level is enabled when logging a message. +// Enabled decides whether a given logging level is enabled when logging a message. func (o *Core) Enabled(level zapcore.Level) bool { r := log.Record{} r.SetSeverity(convertLevel(level)) diff --git a/bridges/otelzap/encoder.go b/bridges/otelzap/encoder.go index 6c6b82f4626..017253d9f7c 100644 --- a/bridges/otelzap/encoder.go +++ b/bridges/otelzap/encoder.go @@ -11,7 +11,10 @@ import ( "go.opentelemetry.io/otel/log" ) -var _ zapcore.ObjectEncoder = (*objectEncoder)(nil) +var ( + _ zapcore.ObjectEncoder = (*objectEncoder)(nil) + _ zapcore.ArrayEncoder = (*arrayEncoder)(nil) +) // objectEncoder implements zapcore.ObjectEncoder. // It encodes given fields to OTel key-values. @@ -146,3 +149,45 @@ func assignUintValue(v uint64) log.Value { } return log.Int64Value(int64(v)) } + +// arrayEncoder implements [zapcore.ArrayEncoder]. +type arrayEncoder struct { + elems []log.Value // nolint:unused +} + +// TODO. +func (a *arrayEncoder) AppendArray(v zapcore.ArrayMarshaler) error { + return nil +} + +// TODO. +func (a *arrayEncoder) AppendObject(v zapcore.ObjectMarshaler) error { + return nil +} + +// TODO. +func (a *arrayEncoder) AppendReflected(v interface{}) error { + return nil +} + +// TODO. +func (a *arrayEncoder) AppendComplex128(v complex128) {} +func (a *arrayEncoder) AppendFloat32(v float32) {} +func (a *arrayEncoder) AppendByteString(v []byte) {} +func (a *arrayEncoder) AppendBool(v bool) {} +func (a *arrayEncoder) AppendUint64(v uint64) {} +func (a *arrayEncoder) AppendFloat64(v float64) {} +func (a *arrayEncoder) AppendInt(v int) {} +func (a *arrayEncoder) AppendInt64(v int64) {} +func (a *arrayEncoder) AppendString(v string) {} +func (a *arrayEncoder) AppendComplex64(v complex64) {} +func (a *arrayEncoder) AppendDuration(v time.Duration) {} +func (a *arrayEncoder) AppendInt32(v int32) {} +func (a *arrayEncoder) AppendInt16(v int16) {} +func (a *arrayEncoder) AppendInt8(v int8) {} +func (a *arrayEncoder) AppendTime(v time.Time) {} +func (a *arrayEncoder) AppendUint(v uint) {} +func (a *arrayEncoder) AppendUint32(v uint32) {} +func (a *arrayEncoder) AppendUint16(v uint16) {} +func (a *arrayEncoder) AppendUint8(v uint8) {} +func (a *arrayEncoder) AppendUintptr(v uintptr) {}