elli-lib / elli_prometheus

Elli middleware for collecting stats via Prometheus.
https://github.com/elli-lib/elli_prometheus/blob/master/doc/elli_prometheus.md
Other
14 stars 8 forks source link

Histogram default buckets fix #2

Closed deadtrickster closed 8 years ago

deadtrickster commented 8 years ago

Hi,

As required by Prometheus client guides default buckets for histograms are decimal fractions of seconds. I personally prefer microseconds too - nice resolution and simple ets:update_counter. So in the first commit I override default buckets for duration histogram. Fell free to change buckets on your own discretion but this is what I'm using for prometheus-plugs (in fact I think I should add these buckets to prometheus.erl itself).

I also allowed myself to add two todos in the second commit. Let me know if you don't like it - I'll remove it.

yurrriq commented 8 years ago

Looks good to me. I like the idea of uniformity between prometheus-plugs and this elli_prometheus. This needs a rebase and I like no spaces between list/tuple elements.

deadtrickster commented 8 years ago

done

yurrriq commented 8 years ago

This can be closed since we've got #3 merged now, right?

deadtrickster commented 8 years ago

Yeah!