erlang-metrics icon indicating copy to clipboard operation
erlang-metrics copied to clipboard

Prometheus.erl support.

Open deadtrickster opened this issue 9 years ago • 13 comments

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

deadtrickster avatar Nov 23 '16 20:11 deadtrickster

ping

deadtrickster avatar Dec 12 '16 17:12 deadtrickster

@deadtrickster go ahead, pr will be welcome :)

benoitc avatar Dec 27 '16 14:12 benoitc

@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?

benoitc avatar Dec 27 '16 16:12 benoitc

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.

deadtrickster avatar May 17 '17 23:05 deadtrickster

What I want personally is something enough to get hackney metrics.

@deadtrickster how do you mean? Having metrics calculated initially ?

benoitc avatar May 19 '17 16:05 benoitc

@deadtrickster any movement on this? I can take a look.

tsloughter avatar Sep 14 '17 03:09 tsloughter

@tsloughter Hi, I just don't know for which version prometheus adatapter should be written. Hackney uses 1.x, current is 2.x. ¯_(ツ)_/¯

deadtrickster avatar Sep 14 '17 06:09 deadtrickster

@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.

benoitc avatar Oct 08 '17 14:10 benoitc

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 avatar Oct 08 '17 14:10 deadtrickster

@deadtrickster are you still up to provide a PR for it? Would be interrested to included it in next release.

benoitc avatar Sep 12 '18 09:09 benoitc

yes, for version 2?

deadtrickster avatar Sep 12 '18 10:09 deadtrickster

we can bump the next erlang-metrics and make it compatible for current hackney version as well :)

benoitc avatar Sep 12 '18 10:09 benoitc

@deadtrickster I was actually going to ping you about this, but now i see you've already opened an issue. Any update on this?

entone avatar Oct 17 '18 17:10 entone