deadtrickster / prometheus.ex

Prometheus.io Elixir client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using float values in Histogram?

orestis opened this issue · comments

Hi, thanks for creating this!

I am confused on how to use float values in Histogram. I want to have my time units in seconds, so I have to keep track float values.

Histogram.observe/2 doesn't accept Float values at all, and Histogram.dobserve/2 seems to be rounding down to zero. Am I doing something wrong?

Hi, could you please paste snippet of your code?

Also, please read how to measure time with prometheus.ex.

OK, I read the code and figured out the native time units must be used. I didn't find the Time page originally, may I suggest it is mentioned/linked from the top-level documentation somehow?

I will try to create a short example that can be used in the documentation.

Yes, looks like this is a hot topic and thanks for the suggestion. I'll reopen this issue with documentation label to not forget to address it soon.