prometheus_http (prometheus v6.0.1)
View SourceHTTP instrumentation helpers
Summary
Functions
Returns default microseconds buckets for measuring http requests duration.
Returns status class for the http status code SCode
.
Types
-type status_class() :: prometheus:label_value().
-type status_code() :: pos_integer().
Functions
-spec 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]
-spec status_class(SCode) -> StatusClass when 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.