pipy
pipy copied to clipboard
aggregated metrics disappear in repo after updating metric labels in codebase pjs
Issue
As subject, change the metric definition in codebase, add extra labels and update the codebase, the metrics lost in the repo aggregated result, however the metric in worker's /metrics got updated accordingly as expected.
Please take a look if it's intentional behavior or a bug?
Version
1.5.8
Reproducible procedures
- Create a codebase and start repo with initial code, and start a worker
var counter = new stats.Counter('test_counter', ['label_one'])
var taskPipe = pipeline($=>$
.onStart([new Data, new StreamEnd])
.handleData(
function (data) {
counter.withLabels('is_a_value').increase()
}
)
)
function metric() {
Promise.all(
[taskPipe.spawn()]
)
.then(()=>new Timeout(1).wait())
.then(metric)
}
metric()
pipy()
.listen(1881)
# pipy --init-repo=/path/to/the/codebase/dir/parent
# pipy --admin-port=6061 http://localhost:6060/repo/metrics-issue/
- update the pjs and add new label
label_twoto the metric, then update codebase
var counter = new stats.Counter('test_counter', ['label_one', 'label_two'])
var taskPipe = pipeline($=>$
.onStart([new Data, new StreamEnd])
.handleData(
function (data) {
counter.withLabels('is_a_value', 'value2').increase()
}
)
)
function metric() {
Promise.all(
[taskPipe.spawn()]
)
.then(()=>new Timeout(1).wait())
.then(metric)
}
metric()
pipy()
.listen(1881)
The test_counter will disappear in the repo's /metrics.