Skip to main content

FastAPI

Install

Async client with lifespan

Request-level audit middleware

The middleware logs api.request on each request with method, path, status, and duration in metadata.

Manual instrumentation

Use the same resource.id (often an execution ID) across all steps of one agent run for correlated filtering.