mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
lib/storage: print __name__
instead of empty string in user-visible tag filters
This commit is contained in:
parent
ade453847f
commit
efbc83a13e
@ -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 New Issue
Block a user