Skip to main content

Module monitoring

Module monitoring 

Source
Expand description

Monitoring helpers for logging request outcomes.

RequestLogger records one monitor-target log line per completed request with path, method, status, and latency. Call RequestLogger::start before handling and RequestLogger::log after to emit the measurement.

let start = RequestLogger::start();
// ... handle request, obtain `status` ...
RequestLogger::log("/users/list", "GET", status, start.elapsed());

Structs§

RequestLogger
Emits one monitor-target log line per completed request with path, method, status, and latency.