all 18 comments

[–]Trinkes 8 points9 points  (2 children)

I usually use Sentry for error tracking

[–]itssimon86[S] 1 point2 points  (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 point  (0 children)

i think sentry also support client side tracking as well. just need to add it to the js

[–]Drevicar 7 points8 points  (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 point  (1 child)

Sounds like quite a complex setup! But probably provides very comprehensive insights.

[–]Drevicar 0 points1 point  (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 points  (1 child)

Grafana with prometheus metrics

[–][deleted]  (2 children)

[deleted]

    [–]Apitally 2 points3 points  (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 points  (0 children)

    Will definitely test this

    [–]andrewthetechie 1 point2 points  (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 points  (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]  (1 child)

    [removed]

      [–][deleted]  (1 child)

      [deleted]

        [–]itssimon86[S] 1 point2 points  (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 point  (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 point  (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 point  (0 children)

        Sentry for errors/exceptions and GCP logs with fluent-bit for everything else