← All platforms

AIOHTTP error tracking

An async request can fail just as loudly as a synchronous one. The Sentry AIOHTTP integration sends the exception to Telebugs 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  python -m hoofnotes

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.

The server, or the HTTP client?

This is for your AIOHTTP web server. Request exceptions can arrive with their URL, method, and Python backtrace. Outgoing client calls are a separate SDK integration.

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.