Skip to content

Commit d0c73eb

Browse files
committed
changes 1
1 parent 1aa6bf0 commit d0c73eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bridges/otelzap/core_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ func BenchmarkCoreWrite(b *testing.B) {
199199
zap.Time("k", time.Unix(1000, 1000)),
200200
zap.Binary("k", []byte{1, 2}),
201201
zap.ByteString("k", []byte{1, 2}),
202-
zap.Object("k", loggable{true}),
203-
zap.Array("k", loggable{true}),
202+
zap.Object("k", turducken{}), // also invokes appendObject
203+
zap.Array("k", turduckens(1)), // also invokes appendArray
204204
zap.String("k", "a"),
205205
zap.Ints("k", []int{1, 2}),
206206
},

bridges/otelzap/encoder.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func getObjectEncoder() (obj *objectEncoder, free func()) {
4242
obj.root.attrs = obj.root.attrs[:0]
4343
obj.root.name = ""
4444
obj.root.next = nil
45-
obj.cur.attrs = obj.cur.attrs[:0]
45+
obj.cur = obj.root
4646
objectEncoderPool.Put(obj)
4747
}
4848
}

0 commit comments

Comments
 (0)