data. Request data is sent to the hosted backend; check what your routes carry first.
Who it is forA backend developer running a FastAPI service.
The problemAdding spans to every endpoint by hand does not scale.
The outcomeRequest traces for every route of your FastAPI app.
What you need first
- Python with pip
- A Logfire account, since the backend is a closed source hosted service
- uv for the uvx commands
Steps
- Install with
pip install logfire - Create your FastAPI app as usual
- Call Logfire.configure() and then Logfire.instrument_fastapi(app)
- Instrument your database connector and http library the same way, as the README suggests
Prompt for your agent
Using pydantic/logfire, add logfire.configure() and logfire.instrument_fastapi(app) to <my FastAPI app> and list the other libraries I should instrument next.
Caveat.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for pydantic/logfire and "Instrument a FastAPI app without manual tracing"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer