deadtrickster / prometheus.erl

Prometheus.io client in Erlang
MIT License
341 stars 117 forks source link

Convert durations in quantiles #128

Closed jonasrichard closed 1 year ago

jonasrichard commented 3 years ago

Quantile values haven't been converted to durations if duration_unit was provided in the metric spec. Now during getting the values it converts (or if it undefined it leaves them alone).

For example before

{1, 100.316, [{0.5, 100316000}, {0.9, 100316000}, {0.95, 100316000}]}
{1, 100.371, [{0.5, 100.371}, {0.9, 100.371}, {0.95, 100.371}]}