Flask guide
Flask error tracking
Errilo receives your Flask errors from the official sentry-sdk package: exceptions raised in your routes, with the request and the failing frame of your code. Already on Sentry? Only the DSN changes.
Errilo is in private beta. This guide describes the setup our compatibility suite tests today.
What gets caught
- An exception raised in a route: the SDK’s Flask integration, which switches on by itself, reports it with the request (URL and method) and the failing frame of your module.
- A chained exception (
raise … from …): both exceptions arrive, the cause first. - A message logged at
ERRORlevel withlogging, as an issue.
Our compatibility suite sends a request to your Flask app through its test client and checks in Errilo the issue’s title, the failing frame, the request, the release and the environment, for every SDK version listed below. Flask has no built-in authentication: without flask-login (not part of our suite), the event’s user holds only the IP address.
The Authorization header and the cookies (session and others) never reach Errilo in clear: with send_default_pii on, the SDK sends them and Errilo replaces them with [Filtered] on receipt, which our suite checks.
Not covered by our suite: Flask extensions, Celery and gunicorn deployments. Errilo stores no tracing or profiling: leave them off.
Setup
Install the SDK with its Flask extra:
pip install "sentry-sdk[flask]"Then initialise it before the app is created, with the DSN of your Errilo project. If you already have a Sentry setup, keep it and change the DSN.
import sentry_sdk
from flask import Flask
sentry_sdk.init(
dsn="https://<key>@ingest.errilo.com/<project>",
)
app = Flask(__name__)Stack traces from your code
Python needs no source maps: a frame carries your file and line as they are on the server. Errilo turns the usual deployment folders (/srv/app/, /code/) into paths relative to your repository, and recognises the frames of installed packages (site-packages) as dependencies, not your code. The tests of the Errilo app cover these rules; the compatibility suite doesn’t deploy your app.
Tested versions
| Tested release | Tested version |
|---|---|
| Oldest | sentry-sdk==2.11.0 |
| In between | sentry-sdk==2.40.0 |
| Latest | sentry-sdk==2.75.0 |
Use sentry-sdk 2.11.0 or later: earlier versions lose exceptions raised inside a function under Python 3.13. Our suite runs Python 3.13, and nothing else.