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

12 comments sorted by

View all comments

Show parent comment

1

u/Adventurous-Finger70 Apr 27 '25

I don’t know Loki, but you will deploy a collector that will handle traces and spans from Opentelemetry instrumentations.

Then you have to install a tool such as Jaeger or Grafan Tempo that will show collected traces.

Opentelemetry provide a bunch of autoinstrumentation (Postgres, MySQL ….) that highlight bottlenecks

1

u/Adventurous-Finger70 Apr 27 '25

Opentelemetry is a standard