Error monitoring for Django.

With sentry-sdk, your Django app reports errors with stack trace, request data and local variables to Fehlo. Setup is one call in settings.py.

As of 21 October 2026, sentry-sdk 2.72.0. We tested the Python SDK with Fehlo on 19 October 2026.

1. Install the package

Terminal
pip install sentry-sdk

The Django integration switches itself on when Django is installed. You do not need an extra like sentry-sdk[django].

2. Start the SDK

Call sentry_sdk.init early in settings.py:

settings.py
import sentry_sdk

sentry_sdk.init(
    dsn="https://<key>@app.fehlo.de/<project-id>",
    environment="production",
    release="my-site@1.0.0",
)

Without arguments the SDK reads its values from the environment, which helps when staging and production report to different projects:

.env
SENTRY_DSN=https://<key>@app.fehlo.de/<project-id>
SENTRY_ENVIRONMENT=production
SENTRY_RELEASE=my-site@1.0.0
settings.py
import sentry_sdk

sentry_sdk.init()

The Python SDK sends no IP addresses and no user data by default. Only set data_collection if you want more: once it is set, its more permissive defaults apply.

3. Test it

urls.py
from django.urls import path


def trigger_error(request):
    division_by_zero = 1 / 0


urlpatterns = [
    path("sentry-debug/", trigger_error),
]

Open /sentry-debug/. The ZeroDivisionError appears in Fehlo with its stack trace and the view's local variables. Errors raised in an interactive shell are not captured.

Measure performance

Add to sentry_sdk.init:

settings.py
traces_sample_rate=0.2,

Each measured request is a transaction and counts against your plan's transaction allowance, not against your events. The SDK then times views, middleware, database queries and templates.

Questions

Nothing arrives. What should I check?

First the DSN: it has to point at app.fehlo.de. Second, whether your server or browser can reach https://app.fehlo.de (firewall, proxy, ad blocker). Third, whether this month's quota is used up; you get an email when it is. Fourth, whether sampleRate or beforeSend drops events. If only performance data is missing, this month's transactions may be used up.