From d2474fa9892cf15f15ff798dd6cfc0dc736844e6 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Fri, 16 Aug 2024 14:35:28 -0600 Subject: [PATCH] fix: split the error and agg metric cases for clarity (#13913) --- pkg/pattern/tee_service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/pattern/tee_service.go b/pkg/pattern/tee_service.go index 13058fbaeb46..c38ef95dd90f 100644 --- a/pkg/pattern/tee_service.go +++ b/pkg/pattern/tee_service.go @@ -387,13 +387,17 @@ func (ts *TeeService) Duplicate(tenant string, streams []distributor.KeyedStream for _, stream := range streams { lbls, err := syntax.ParseLabels(stream.Stream.Labels) - if err != nil || lbls.Has(push.AggregatedMetricLabel) { + if err != nil { level.Error(ts.logger). Log("msg", "error parsing stream labels", "labels", stream.Stream.Labels, "err", err) continue } + if lbls.Has(push.AggregatedMetricLabel) { + continue + } + ts.buffersMutex.Lock() ts.buffers[tenant] = append(ts.buffers[tenant], stream) ts.buffersMutex.Unlock()