Prometheus.Contrib.HTTP (Prometheus.ex v4.0.0)
View SourceHTTP instrumentation helpers
Summary
Functions
Returns default microseconds buckets for measuring http requests duration
Returns class of the http status code
Functions
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]
Returns class of the http status code:
iex(7)> Prometheus.Contrib.HTTP.status_class(202)
~c"success"
Raises Prometheus.InvalidValueError
exception if code
is not a positive integer.