RepeatedTask metric labels are incorrect
Closed this issue · 3 comments
jdm-square commented
looks like it's trying to add two labels to the metric,
name
and result
. There are two problems here:
- that
tag
method actually takeskey
andvalue
parameters, so we are adding one label namedname
and recording the valueresult
- there's no attempt to pass correct tags when recording the metric in https://github.com/cashapp/wisp/blob/main/wisp-task/src/main/kotlin/wisp/task/RepeatedTask.kt#L108
jdm-square commented
I've been trying to write a pull request that fixes this and adds tests that metrics are being recorded as expected, but I am having a very difficult time getting a usable metric registry in unit tests.
jdm-square commented
@chris-ryan-square Are there any examples of validating metrics in unit tests for wisp that I can follow?
chris-ryan-square commented
Not that I am aware of - I think the only reference to metrics is in wisp-task