Skip to main content

Sentry integration for ASGI frameworks.

Project description

sentry-asgi

Build Status Coverage Package version

Sentry integration for ASGI frameworks.

Installation:

pip install sentry-asgi

Usage:

from sentry_asgi import SentryMiddleware
import sentry_sdk


sentry_sdk.init(dsn=...)

app = ...
app = SentryMiddleware(app)

Notes

The SentryMiddleware will capture and log application exceptions just fine.

Explicitly logging events using the SDK from within views does not currently appear to work correctly.

It is recommended that frameworks populate an "endpoint" key in the ASGI scope, to indicate which view function or class should be logged by the middleware.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sentry-asgi-0.1.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page