Set Up Bugsly for Python

Track Python errors with automatic exception capture, breadcrumbs, and AI analysis. Sentry SDK-compatible.

1. Install the SDK

pip install sentry-sdk

2. Configure Bugsly

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

import sentry_sdk

sentry_sdk.init(
    dsn="https://your-dsn@bugsly.dev/1",
    environment="production",
    traces_sample_rate=1.0,
    profiles_sample_rate=1.0,
)

# Errors are captured automatically, or manually:
try:
    dangerous_operation()
except Exception as e:
    sentry_sdk.capture_exception(e)

# Add context
sentry_sdk.set_user({"id": "user-123", "email": "user@example.com"})
sentry_sdk.set_tag("feature", "checkout")

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 Python

  • Automatic exception capture with full tracebacks
  • Breadcrumb trail showing events leading to errors
  • Performance profiling with flame graphs
  • Thread and async context tracking
  • AI analysis explains Python errors in plain English
  • Drop-in compatible with existing Sentry SDK setups

Frequently Asked Questions

Why does Bugsly use the Sentry SDK for Python?

Bugsly is wire-compatible with the Sentry protocol. The sentry-sdk Python package works out of the box — just point your DSN to Bugsly. No vendor lock-in, no code changes if you switch.

Does Bugsly work with Python async/await?

Yes. The SDK automatically tracks asyncio context, so errors in async handlers include the correct task and coroutine information.

Can I use Bugsly with Python 3.8+?

Yes. The sentry-sdk supports Python 3.8 and above, including 3.12 and 3.13.

Start tracking errors in Python for free

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

Start Free