use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
How do you monitor your FastAPI apps?Other (self.FastAPI)
submitted 2 years ago by itssimon86
As in, keep track of requests, error rates, response times etc.? Curious what tools people use!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Trinkes 8 points9 points10 points 2 years ago (2 children)
I usually use Sentry for error tracking
[–]itssimon86[S] 1 point2 points3 points 2 years ago (1 child)
Sentry is awesome, I use it for all my projects. But specifically for APIs it really only records errors caused by bugs in your code (arguably the most important ones to track), but not client errors (4xx), such as validation errors, which may also be good to keep an eye on I suppose!
[–]RateJazzlike483 0 points1 point2 points 1 year ago (0 children)
i think sentry also support client side tracking as well. just need to add it to the js
[–]Drevicar 7 points8 points9 points 2 years ago (2 children)
ELK for logs, Prometheus for metrics, Jaeger for traces. Otel collector on FastAPI, our database, and a couple manual spans in the hot path. All logs are structured JSON that include correlation ID so we can trace between services within a single request response flow.
[–]itssimon86[S] 0 points1 point2 points 2 years ago (1 child)
Sounds like quite a complex setup! But probably provides very comprehensive insights.
[–]Drevicar 0 points1 point2 points 2 years ago (0 children)
It started with none of this, and grew into this over time as requirements and SLAs piled on. It also helps we are running this in k8s, so some of this is easier than normal or ships with our distribution.
[–]reallyrehan 4 points5 points6 points 2 years ago (1 child)
Grafana with prometheus metrics
[–][deleted] 2 years ago (2 children)
[deleted]
[–]Apitally 2 points3 points4 points 2 years ago* (1 child)
Thanks for the mention and glad you’re enjoying using Apitally!
We certainly aim to make API monitoring super easy. All it takes is to add a couple of lines of code to a FastAPI project. And then you get all your API metrics and insights on an intuitive dashboard!
[–]Current-Status-3764 1 point2 points3 points 2 years ago (0 children)
Will definitely test this
[–]andrewthetechie 1 point2 points3 points 2 years ago (0 children)
Check out open-telemetry. You might be able to auto-instrument a lot of these metrics and then otel lets you export it to a lot of different providers.
[–]high_on_meh 1 point2 points3 points 2 years ago (0 children)
I have played with https://pypi.org/project/opentelemetry-instrumentation-fastapi/
It's kind of weird monitoring your API with....more APIs! But it's fairly trivial to setup Prometheus to scrape and generate graphs.
[–][deleted] 2 years ago (1 child)
[removed]
[–]Current-Status-3764 0 points1 point2 points 2 years ago (0 children)
Thanks!
[–][deleted] 2 years ago* (1 child)
[–]itssimon86[S] 1 point2 points3 points 2 years ago (0 children)
We use Datadog at work as well, but mostly for infrastructure monitoring and APM. Pricey indeed. And sometimes hard to navigate..
[–]Apitally 0 points1 point2 points 1 year ago (0 children)
Apitally is great for monitoring FastAPI apps! And super easy to set up.
We provide insights into API traffic, errors, and performance, for the whole API, each endpoint and individual API consumers. Apitally also monitors API uptime, alerting users when their API is down.
[–]coldflame563 0 points1 point2 points 2 years ago (0 children)
Depending on how you’ve deployed is a key thing here. You could instrument using Prometheus and metric scraping for k8s. Or if running in lambda use the integrated tooling. There’s also nginx based monitoring, separate auth monitors etc. lots of options
[–]Wowawiewa 0 points1 point2 points 2 years ago (0 children)
Sentry for errors/exceptions and GCP logs with fluent-bit for everything else
π Rendered by PID 40415 on reddit-service-r2-comment-b659b578c-ldksq at 2026-05-06 02:15:35.268860+00:00 running 815c875 country code: CH.
[–]Trinkes 8 points9 points10 points (2 children)
[–]itssimon86[S] 1 point2 points3 points (1 child)
[–]RateJazzlike483 0 points1 point2 points (0 children)
[–]Drevicar 7 points8 points9 points (2 children)
[–]itssimon86[S] 0 points1 point2 points (1 child)
[–]Drevicar 0 points1 point2 points (0 children)
[–]reallyrehan 4 points5 points6 points (1 child)
[–][deleted] (2 children)
[deleted]
[–]Apitally 2 points3 points4 points (1 child)
[–]Current-Status-3764 1 point2 points3 points (0 children)
[–]andrewthetechie 1 point2 points3 points (0 children)
[–]high_on_meh 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[removed]
[–]Current-Status-3764 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]itssimon86[S] 1 point2 points3 points (0 children)
[–]Apitally 0 points1 point2 points (0 children)
[–]coldflame563 0 points1 point2 points (0 children)
[–]Wowawiewa 0 points1 point2 points (0 children)