Open piotr-yuxuan opened 3 years ago
This issue if fixed (thanks @piotr-yuxuan) it will be released with the next release (v0.7.2 or v0.8.0)
Reopening as this issue needs more work.
Currently the μ/log Prometheus publisher converts events into metrics by creating a new metrics for every numerical value. It uses string values as labels. However, it only looks at numerical values on the top-level event map, it doesn't nest.
One option/workaround is to add a :transform
function on your
Prometheus publisher to copy the metrics you are interested into
publishing on the top level.
If you want all metrics you will need to "flatten" a nested map while preserving the names.
I will think whether this could be something that it is done automatically by μ/log publisher. My worry is that this might cause an explosion of metrics to be published.
Hello, thanks for this nice project! I've been stumbling upon one exception, and one unexpected behaviour while trying to expose JVM metrics to Prometheus scrapper:
So far the counter
clojure_core_mulog_jvm_metrics_sampled
increases, but no further metrics are exposed. I think this snippet is pretty close to the doc so I'm a bit puzzled.On my machine this behaviour appeared consistent accross versions
0.5.0
,0.6.0
,0.7.0
, and0.7.1
.