Prometheus.erl support.
Hello!
I want to add prometheus.erl support.
Metrics:
- counter - non-negative number. Always can only go up (or reset);
- gauge - number. Can be incremented/decremented or set to arbitrary value;
- summary - right now just samples count and sum;
- histogram - samples count/sum + per bucket count.
How this could be mapped to erlang-metrics metrics?
Thank you
ping
@deadtrickster go ahead, pr will be welcome :)
@deadtrickster sorry was short on my answer :)
IMO you can do like what i did in grapherl:
https://github.com/benoitc/erlang-metrics/blob/master/src/metrics_grapherl.erl#L32-L34
doing what you do on counter , gauge and histogram is ok. then it's about the application to handle the logic. Tjoughts?
Now when you use prometheus, what you think is be best way to approach it? What I want personally is something enough to get hackney metrics.
What I want personally is something enough to get hackney metrics.
@deadtrickster how do you mean? Having metrics calculated initially ?
@deadtrickster any movement on this? I can take a look.
@tsloughter Hi, I just don't know for which version prometheus adatapter should be written. Hackney uses 1.x, current is 2.x. ¯_(ツ)_/¯
@deadtrickster why do you care about the version used by hackney? Erlang-metrics is using a feature not available in Erlang < 17 , so until the support of Erlang 16 is removed this could likely happen unfortunately.
because I have some hackney code I want to get metrics from:-). Do you have an estimation for hackney 2? I assume this will use metric2?
@deadtrickster are you still up to provide a PR for it? Would be interrested to included it in next release.
yes, for version 2?
we can bump the next erlang-metrics and make it compatible for current hackney version as well :)
@deadtrickster I was actually going to ping you about this, but now i see you've already opened an issue. Any update on this?