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. You should see the error appear within seconds, complete with stack trace, breadcrumbs, and AI-powered analysis.

What You Get with Django

  • Automatic Django middleware integration
  • ORM query performance tracking with N+1 detection
  • 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?

Yes. The SDK automatically records database queries as breadcrumbs and performance spans. Slow queries and N+1 patterns are flagged in the performance dashboard.

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

Get AI-powered error analysis, session replay, and performance monitoring — included free on every plan.

Start Free