HTTP instrumentation helpers.
status_class() = prometheus_model_helpers:label_value()
status_code() = pos_integer()
microseconds_duration_buckets/0 | Returns default microseconds buckets for measuring http requests duration. |
status_class/1 |
Returns status class for the http status code SCode . |
microseconds_duration_buckets() -> prometheus_buckets:buckets()
Returns default microseconds buckets for measuring http requests duration.
1> prometheus_http:microseconds_duration_buckets().
[10, 25, 50, 100, 250, 500,
1000, 2500, 5000, 10000, 25000, 50000, 100000, 250000, 500000,
1000000, 2500000, 5000000, 10000000]
status_class(SCode) -> StatusClass
SCode = status_code()
StatusClass = status_class()
Returns status class for the http status code SCode
.
2> prometheus_http:status_class(202).
"success"
Raises {invalid_value_error, SCode, Message}
error if SCode
isn't a positive integer.