Closed toxicafunk closed 3 years ago
Are these for the Prometheus implementation of the Metrics
service? Or were you thinking about having this functionality more generally? I guess same question applies to the other related tickets.
Initially I have though of creating a full-on, complete ZIO-based P{rometheus client, but given the way zmx basically queues metrics on a Ring and how we deal with them:
Now I think it may be better to just implement the Collectors and then implement a write004
function that format them as Prometheus expects.
So instead of having the user specify how to deal with prometheus:
we can provide the correct functions ourselves which will use said collectors and write004
function:
https://github.com/zio/zio-zmx/blob/da7685cd614fd736950abb9f4cd79e9422f949e9/src/test/scala/zio/PrometheusSpec.scala#L53
Implement monotonically increasing counter as described in https://prometheus.io/docs/instrumenting/writing_clientlibs/#counter