mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 15:16:42 +00:00
lib/storage: print __name__
instead of empty string in user-visible tag filters
This commit is contained in:
parent
625f6ca761
commit
c04f60db35
1 changed files with 5 additions and 1 deletions
|
@ -136,7 +136,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)
|
||||
}
|
||||
|
||||
func (tf *tagFilter) Marshal(dst []byte, accountID, projectID uint32) []byte {
|
||||
|
|
Loading…
Reference in a new issue