Prometheus: Enable the promQLScope (Scopes, Adhoc filters and groupby) by default (#92080)

This commit is contained in:
Kyle Brandt
2024-09-03 09:56:25 -04:00
committed by GitHub
parent 88259da745
commit d382ea773a
5 changed files with 17 additions and 10 deletions
+5 -3
View File
@@ -238,9 +238,11 @@ func Parse(span trace.Span, query backend.DataQuery, dsScrapeInterval string, in
}()))
}
expr, err = ApplyFiltersAndGroupBy(expr, scopeFilters, model.AdhocFilters, model.GroupByKeys)
if err != nil {
return nil, err
if len(scopeFilters) > 0 || len(model.AdhocFilters) > 0 || len(model.GroupByKeys) > 0 {
expr, err = ApplyFiltersAndGroupBy(expr, scopeFilters, model.AdhocFilters, model.GroupByKeys)
if err != nil {
return nil, err
}
}
}