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. 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"}]}}'

Still comparing tools? Read our guide to Python application performance monitoring in 2026.

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

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