← All platforms

Bottle error tracking

A small Bottle app deserves more than an error in a forgotten terminal. Connect the Sentry Python SDK to Telebugs and keep the reports on your server.

~/hoofnotes  pip install sentry-sdk
~/hoofnotes  nvim app.py
import sentry_sdk
sentry_sdk.init(
# Copy the complete Telebugs DSN, key and path included.
dsn="YOUR_TELEBUGS_DSN",
)
from hoofnotes.web import app
~/hoofnotes  gunicorn app:app

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep sentry-sdk and change its destination to your Telebugs DSN. Your error reports stay on your server. You don’t need a Sentry account.

Does a little Bottle app need a special SDK?

No. The Sentry Python SDK includes a Bottle integration. It reports unhandled route exceptions without turning your small app into a bigger project.

What about an error I handle myself?

It can still be worth investigating. Send it with sentry_sdk.capture_exception and keep its backtrace alongside the errors the integration captures.