Skip to content

Commit

Permalink
fix: split the error and agg metric cases for clarity (#13913)
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney authored Aug 16, 2024
1 parent 8319d1c commit d2474fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/pattern/tee_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d2474fa

Please sign in to comment.