From a338baf6cd997d801cf5210f72b4be23b8b4ada3 Mon Sep 17 00:00:00 2001 From: Florian Derler Date: Fri, 15 Mar 2024 11:01:55 +0100 Subject: [PATCH] do not show __name__ in labe name results --- prometheus/querier.go | 1 + 1 file changed, 1 insertion(+) diff --git a/prometheus/querier.go b/prometheus/querier.go index 981ea548..077fcaaa 100644 --- a/prometheus/querier.go +++ b/prometheus/querier.go @@ -100,6 +100,7 @@ func (q *Querier) LabelNames(matchers ...*labels.Matcher) ([]string, storage.War } w.And(and) } + w.And("value != '__name__'") fromDate := time.Now().AddDate(0, 0, -q.config.ClickHouse.TaggedAutocompleDays).UTC() w.Andf("Date >= '%s'", fromDate.Format("2006-01-02"))