Skip to content

Commit 0af971e

Browse files
committed
set cap to 128 instead of 300
1 parent 6c64dfe commit 0af971e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ddtrace/tracer/payload_v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func (p *payloadV1) push(t spanList) (stats payloadStats, err error) {
247247
// Pre-size buffer based on estimated span encoding size.
248248
// 300 is an arbitrary guess for the average span encoding size -- we should measure and update this value
249249
if cap(p.buf) == 0 {
250-
p.buf = make([]byte, 0, len(t)*300)
250+
p.buf = make([]byte, 0, len(t)*128)
251251
}
252252
p.buf = encodeStringField(p.buf, p.bm, 2, p.containerID, p.st)
253253
p.buf = encodeStringField(p.buf, p.bm, 3, p.languageName, p.st)

0 commit comments

Comments
 (0)