MetricsMiddleware
authx_extra.metrics.MetricsMiddleware
Bases: BaseHTTPMiddleware
Metrics middleware collecting prometheus metrics for each request.
Initialize a new MetricsMiddleware instance.
PARAMETER | DESCRIPTION |
---|---|
app |
TYPE:
|
prefix |
TYPE:
|
buckets |
TYPE:
|
Source code in authx_extra/metrics.py
dispatch
async
Record request method, path and status when dispatching.
PARAMETER | DESCRIPTION |
---|---|
request |
TYPE:
|
call_next |
TYPE:
|