-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Due to the implementation of internal storage, it is possible to overwrite existing observations if they have two or more labels:
tarantool> c = metrics.gauge('coll')
---
...
tarantool> c:set(3, {lab = 'val', lab2 = 'val2'})
---
...
tarantool> c:collect()
---
- - label_pairs:
lab2: val2
lab: val
timestamp: 1675671598982881
value: 3
metric_name: coll
...
tarantool> c:set(4, {['lab\tval\tlab2'] = 'val2'})
---
...
tarantool> c:collect()
---
- - label_pairs:
"lab\tval\tlab2": val2
timestamp: 1675671636647270
value: 4
metric_name: coll
...
It is highly unlikely that someone would become a victim of this bug unintentionally, but this behavior still seems a bit problematic.
Moreover, using special symbols breaks prometheus export:
# HELP coll
# TYPE coll gauge
coll{lab val lab2="val2"} 4
error while linting: text format parsing error in line 3: expected '=' after label name, found 'v'
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working