diff --git a/pkg/ingester/stream.go b/pkg/ingester/stream.go index dde44a050bc2..801331c42376 100644 --- a/pkg/ingester/stream.go +++ b/pkg/ingester/stream.go @@ -310,6 +310,5 @@ func (s *stream) addTailer(t *tailer) { } func (s *stream) matchesTailer(t *tailer) bool { - metric := util.LabelsToMetric(s.labels) - return t.isWatchingLabels(metric) + return t.isWatchingLabels(s.labels) } diff --git a/pkg/ingester/tailer.go b/pkg/ingester/tailer.go index d1670e4c2904..091eb9e691ef 100644 --- a/pkg/ingester/tailer.go +++ b/pkg/ingester/tailer.go @@ -8,7 +8,6 @@ import ( cortex_util "github.com/cortexproject/cortex/pkg/util" "github.com/go-kit/kit/log/level" - "github.com/prometheus/common/model" "github.com/prometheus/prometheus/pkg/labels" "golang.org/x/net/context" @@ -183,9 +182,9 @@ func (t *tailer) processStream(stream logproto.Stream) ([]logproto.Stream, error } // Returns true if tailer is interested in the passed labelset -func (t *tailer) isWatchingLabels(metric model.Metric) bool { +func (t *tailer) isWatchingLabels(lbs labels.Labels) bool { for _, matcher := range t.matchers { - if !matcher.Matches(string(metric[model.LabelName(matcher.Name)])) { + if !matcher.Matches(lbs.Get(matcher.Name)) { return false } }