mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00:00
app/vmselect/netstorage: apply Graphite filter after substituting __name__
with name
This commit is contained in:
parent
6bcbdb18fb
commit
59fb75717e
1 changed files with 6 additions and 6 deletions
|
@ -567,12 +567,6 @@ func GetGraphiteTags(at *auth.Token, denyPartialResponse bool, filter string, li
|
|||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
if len(filter) > 0 {
|
||||
labels, err = applyGraphiteRegexpFilter(filter, labels)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
}
|
||||
// Substitute "__name__" with "name" for Graphite compatibility
|
||||
for i := range labels {
|
||||
if labels[i] == "__name__" {
|
||||
|
@ -581,6 +575,12 @@ func GetGraphiteTags(at *auth.Token, denyPartialResponse bool, filter string, li
|
|||
break
|
||||
}
|
||||
}
|
||||
if len(filter) > 0 {
|
||||
labels, err = applyGraphiteRegexpFilter(filter, labels)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
}
|
||||
if limit > 0 && limit < len(labels) {
|
||||
labels = labels[:limit]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue