Per-request event emitted after a request completes. Embedders
subscribe to the AppState::usage_events broadcast channel to
observe live traffic without scraping the Prometheus endpoint.
Middleware that logs every incoming HTTP request with method, path,
status, and latency. 2xx/3xx log at info, 4xx/5xx at warn.
/health and /metrics log at debug so probes don’t flood the
default output.
Build the Axum router with all API routes, the built-in auth middleware,
active-connection tracking, /health, and merged admin routes. This is
the batteries-included shape used by the standalone gateway binary.
Build the bare API route tree (/v1/*) bound to state, with no
auth, observability, or admin layers. Embedders use this when they
want to install their own auth or observability middleware instead of
the defaults in router. Standalone callers should prefer router.