Prometheus.ex v1.0.0-alpha10 Prometheus.Contrib.HTTP
HTTP instrumentation helpers
Summary
Macros
Returns default microseconds buckets for measuring http requests duration
Returns class of the http status code
Macros
Returns default microseconds buckets for measuring http requests duration:
iex(6)> Prometheus.Contrib.HTTP.microseconds_duration_buckets
[10, 100, 1000, 10000, 100000, 300000, 500000, 750000, 1000000, 1500000,
2000000, 3000000]
Returns class of the http status code:
iex(7)> Prometheus.Contrib.HTTP.status_class(202)
'success'
Raises Prometheus.InvalidValueError
exception if code
is not a positive integer.