From 4aa8b013ed561442bd2e7e79eb108ab0e48e169b Mon Sep 17 00:00:00 2001 From: Karim Radhouani Date: Tue, 2 Jul 2024 13:15:40 -0700 Subject: [PATCH] suppress empty lists of events when marshaling messages on output --- pkg/outputs/output.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/outputs/output.go b/pkg/outputs/output.go index 7f514115..3c8b91c4 100644 --- a/pkg/outputs/output.go +++ b/pkg/outputs/output.go @@ -169,6 +169,9 @@ func Marshal(pmsg protoreflect.ProtoMessage, meta map[string]string, mo *formatt if err != nil { return nil, err } + if len(b) == 0 { + return nil, nil + } return [][]byte{b}, nil } }