Expand description
Cross-cutting middleware. Ports the reusable concerns of agent_core/api/:
request-id propagation (request_id) and the API latency SLO
(latency_slo).
Structs§
- Request
Id - A request id, available to handlers via
Extension<RequestId>.
Constants§
- SLO_
BUDGET_ MS - The API latency budget (p95 ≤ 1s is the product line). Requests over this
are logged at
warnso a regression surfaces without a profiler.
Functions§
- latency_
slo - Time each request, attach
x-response-time-ms, and warn past the SLO budget. - request_
id - Mint (or honor a client-supplied) request id, stash it in extensions for handlers, and echo it on the response.