deadtrickster / prometheus.ex

Prometheus.io Elixir client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prefer already formatted time value instead of native time

svileng opened this issue · comments

Getting Histograms to work with time values is not straightforward. I never used or converted any time values to native time until I started using this library. I think this is counter intuitive and prone to error, since it is easy to mis-read the documentation.

It will be much more natural to do the conversion to native time inside the library by default, rather than asking the user to do so every time. This way the user can supply an integer/float and the library will do the conversion for you.

I realise this will be a breaking change but I think it will pay off. What do you think?