Set Up Bugsly for Django

Full Django integration with automatic middleware setup, ORM query tracking, template error capture, and Celery task monitoring.

1. Install the SDK

pip install sentry-sdk[django]

2. Configure Bugsly

Add the following to your application entry point. Replace the DSN with your project DSN from the Bugsly dashboard.

# settings.py
import sentry_sdk

sentry_sdk.init(
    dsn="https://your-dsn@bugsly.dev/1",
    environment="production",
    traces_sample_rate=1.0,
    send_default_pii=True,
    integrations=[
        # Django integration is auto-detected
    ],
)

# That's it — Django middleware, views, templates,
# and ORM queries are automatically instrumented.

3. Verify It Works

Trigger a test error in your application and check your Bugsly dashboard. The error should show up as an issue within a few seconds.

Want to check your DSN before touching any code? From a macOS, Linux or WSL terminal, this sends one real error without any SDK (replace your-dsn with the key from your DSN):

curl -sS -X POST "https://bugsly.dev/api/1/envelope/" \
  -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=your-dsn" \
  --data-binary $'{}\n{"type":"event"}\n{"level":"error","platform":"other","exception":{"values":[{"type":"CurlTestError","value":"Hello from my terminal"}]}}'

What You Get with Django

  • Automatic Django middleware integration
  • ORM queries recorded as breadcrumbs and spans
  • Template rendering error capture with context
  • Celery task monitoring and error tracking
  • User context from Django auth automatically attached
  • Management command error tracking

Frequently Asked Questions

How do I set up Bugsly with Django?

Install sentry-sdk[django] and add the sentry_sdk.init() call to your settings.py. The Django integration is auto-detected — no middleware changes or additional configuration needed.

Does Bugsly track Django ORM queries?

The Sentry Django integration records database queries as breadcrumbs and performance spans, and they are sent to Bugsly with the event.

Can Bugsly monitor Celery tasks in Django?

Yes. Install sentry-sdk[celery] and the Celery integration activates automatically. Task errors, retries, and performance are all tracked.

Start tracking errors in Django for free

The free plan includes 100 issues per month, 7-day retention and 10 AI requests per month. Paid plans start at $19/mo.

Start Free