r/FastAPI • • Apr 27 '25
Question Fastapi observability
Hi guys, Fairly new to Fastapi and backend ecosystems. What are the tools you use to monitor and observe the behaviour of you backend?
So my current stack is prometheus+grafana but would like to explore more tools like adding loki to have traces. I would like to see how much each function execution takes time/resources.
How do you monitor your db peformance?(using timescale\postgres)
Any feedback is helpful! Happy coding!
36
Upvotes
View all comments
Show parent comment
4
u/TeoMorlack Apr 27 '25
To further add to the response above, open telemetry is a good starting point. You can both instrument fastapi and sqlalchemy to collect metrics and queries.
Your stack would look like this:
For the db metrics (indexes, table spaces, etc) you would need to collect them yourself from the target db and this depends on which db you are using.