Skip to content

Commit 1ec4183

Browse files
committed
clean useless code
1 parent 2168588 commit 1ec4183

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

pkg/model/filters/filters.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ func (m MultiQueries) Distribute(toDistribute []SingleQuery, ignorePred func(Sin
8484
func (m *Match) ToLabelFilter() (LabelFilter, bool) {
8585
values := strings.Split(m.Values, ",")
8686
if len(values) == 1 && isExactMatch(values[0]) {
87-
// namespace must be exact match
8887
if m.Not {
8988
return NotStringLabelFilter(m.Key, trimExactMatch(values[0])), true
9089
} else if m.MoreThanOrEqual {

pkg/prometheus/query.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ func appendFilteredMetric(sb *strings.Builder, metric string, filters filters.Si
145145
sb.WriteRune('{')
146146
first := true
147147
for _, filter := range filters {
148-
// namespace filtering is managed by prom label proxy so we can simply skip it
149-
if filter.Key == "namespace" {
150-
continue
151-
}
152148
if lf, ok := filter.ToLabelFilter(); ok {
153149
if !first {
154150
sb.WriteRune(',')

0 commit comments

Comments
 (0)