mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
lib/storage: print __name__
instead of empty string in user-visible tag filters
This commit is contained in:
parent
ade453847f
commit
efbc83a13e
1 changed files with 5 additions and 1 deletions
|
@ -124,7 +124,11 @@ func (tf *tagFilter) String() string {
|
|||
} else if tf.isRegexp {
|
||||
op = "=~"
|
||||
}
|
||||
return fmt.Sprintf("%s%s%q", tf.key, op, tf.value)
|
||||
key := tf.key
|
||||
if len(key) == 0 {
|
||||
key = []byte("__name__")
|
||||
}
|
||||
return fmt.Sprintf("%s%s%q", key, op, tf.value)
|
||||
}
|
||||
|
||||
// Marshal appends marshaled tf to dst
|
||||
|
|
Loading…
Reference in a new issue