r/FastAPI • u/usv240 • Jan 17 '26
pip package I built TimeTracer, record/replay API calls locally + dashboard (FastAPI/Flask)
After working with microservices, I kept running into the same annoying problem: reproducing production issues locally is hard (external APIs, DB state, caches, auth, env differences).
So I built TimeTracer.
What it does:
- Records an API request into a JSON “cassette” (timings + inputs/outputs)
- Lets you replay it locally with dependencies mocked (or hybrid replay)
What’s new/cool:
- Built-in dashboard + timeline view to inspect requests, failures, and slow calls
- Works with FastAPI + Flask
- Supports capturing httpx, requests, SQLAlchemy, and Redis
Security:
- More automatic redaction for tokens/headers
- PII detection (emails/phones/etc.) so cassettes are safer to share
Install:
pip install timetracer
GitHub:
https://github.com/usv240/timetracer
Contributions are welcome. If anyone is interested in helping (features, tests, documentation, or new integrations), I’d love the support.
Looking for feedback: What would make you actually use something like this, pytest integration, better diffing, or more framework support?
2
u/Adhesiveduck Jan 18 '26
This looks really interesting...
Is there planned support for aiohttp?
I would love to see some performance stats on "heavy" endpoints where timetracer is turned on, what impact does it have?
2
u/whenyousaywisconsin Jan 19 '26
What’s the difference or advantage to use your tooling vs open telemetry and open observe? It doesn’t record on a way that lets you “replay” but all spans and traces provide data necessary for reproducing in my experience
1
u/Heavy_End_2971 Jan 18 '26
Can you send me references or tutorials to build pure microservices in fastapi? Any guide tutorial which implements all components and features around microservices. Gateway, inter process communication, circuit breaker, tracing, event driven, any other pattern. I am from java world and find very less ecosystem in python or FastAPI specifically. Thanks in advance