From 3ceffd88d0268680cc1e64396a2c8d291b0639e4 Mon Sep 17 00:00:00 2001 From: Evstigneev Denis Date: Thu, 21 Nov 2024 22:21:57 +0300 Subject: [PATCH] undo update size allocate --- tracer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracer.go b/tracer.go index d9a81e2..4011477 100644 --- a/tracer.go +++ b/tracer.go @@ -54,7 +54,7 @@ func (m *hookTracer) OnProduceRecordBuffered(r *kgo.Record) { omd, ok := metadata.FromOutgoingContext(r.Context) if !ok { - omd = metadata.New(0) + omd = metadata.New(len(r.Headers)) } md := metadata.Copy(omd) @@ -121,7 +121,7 @@ func (m *hookTracer) OnFetchRecordBuffered(r *kgo.Record) { } omd, ok := metadata.FromIncomingContext(r.Context) if !ok { - omd = metadata.New(0) + omd = metadata.New(len(r.Headers)) } md := metadata.Copy(omd)