Module utils

Source
Expand description

Utilities for getting metric names at runtime, and other helpers.

Constants§

SECONDS_DURATION_BUCKETS
Standard HTTP request duration buckets measured in seconds. The default buckets are tailored to broadly measure the response time of a network service. Most likely, however, you will be required to define buckets customized to your use case.

Functions§

requests_duration_name
The name of the requests duration metric. By default, it’s the same as AXUM_HTTP_REQUESTS_DURATION_SECONDS, but can be changed via the with_prefix function.
requests_pending_name
The name of the requests pending metric. By default, it’s the same as AXUM_HTTP_REQUESTS_PENDING, but can be changed via the with_prefix function.
requests_total_name
The name of the requests total metric. By default, it’s the same as AXUM_HTTP_REQUESTS_TOTAL, but can be changed via the with_prefix function.
response_body_size_name
The name of the response body size metric. By default, it’s the same as AXUM_HTTP_RESPONSE_BODY_SIZE, but can be changed via the with_prefix function.