Match sync and async execution
Use the synchronous client for ordinary workers and the async client for asyncio request or agent paths so telemetry does not block the event loop.
Instrument Python APIs, workers, database applications, and AI agent frameworks with synchronous or asyncio-safe structured events.
Reviewed by the Telemetry product team on . Runtime boundaries, shared event fields, verification workflow, and upstream implementation sources. Review standards and ownership
9 implementation guides
Every guide includes a server-side snippet, delivery and privacy boundaries, a verification query, related SQL, and links to upstream documentation.
Browse guidesSelection framework
Use the synchronous client for ordinary workers and the async client for asyncio request or agent paths so telemetry does not block the event loop.
A successful handler is not a successful business outcome until the database commit, queued task, or model workflow has reached its durable boundary.
Record a controlled error type and failed step. Avoid raw exception text when it can contain SQL parameters, prompts, secrets, or customer content.
Shared event contract
Adapt these fields to the workflow, but keep units, status categories, identifiers, and ownership explicit before several services depend on the same table.
Verification
Implementation guides
Capture FastAPI request outcomes and latency with the asynchronous Telemetry client and normalized route names.
Open guideConnect Django request outcomes and Celery task lifecycles with safe identifiers, latency, retries, and terminal status.
Open guideMeasure Flask request outcomes and SQLAlchemy transaction behavior with bounded Python events, stable route templates, and safe error categories.
Open guideMeasure Pydantic AI run outcomes, validated outputs, retries, tool activity, latency, usage, and product acceptance with safe structured events.
Open guideTrack CrewAI crew and flow outcomes, task counts, handoffs, retries, latency, cost, and accepted results without retaining agent conversations.
Open guideTrack LlamaIndex agent and workflow outcomes, tool activity, latency, retrieval versions, cost, and reviewed quality with structured events.
Open guideMeasure DSPy program latency, failures, metric scores, optimizer versions, model cost, and accepted outcomes across releases with SQL-ready events.
Open guideTrack AutoGen team and agent outcomes, messages, tool activity, handoffs, latency, failures, cost, and releases with compact structured events.
Open guideTrack LiteLLM provider routing, retries, fallbacks, token usage, latency, cost estimates, and accepted outcomes across a controlled model gateway.
Open guideCreate a free API key, choose the closest runtime guide, and send one known success and failure before expanding coverage.