Prometheus.ex v3.0.5 Prometheus.Contrib.HTTP View Source
HTTP instrumentation helpers
Link to this section Summary
Functions
Returns default microseconds buckets for measuring http requests duration
Returns class of the http status code
Link to this section Functions
Link to this macro
microseconds_duration_buckets() View Source (macro)
Returns default microseconds buckets for measuring http requests duration:
iex(6)> Prometheus.Contrib.HTTP.microseconds_duration_buckets
[10, 25, 50, 100, 250, 500, 1000, 2500, 5000, 10000, 25000, 50000,
100000, 250000, 500000, 1000000, 2500000, 5000000, 10000000]
Link to this macro
status_class(code) View Source (macro)
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.