Sentry Middleware
Using the Sentry middleware is useful to:
- Capture exceptions for reporting
- Add tracing to each function run
- Include useful context for each exception and trace like function ID and event names
Installation
The SentryMiddleware is shipped as part of the inngest package:
import inngest
from inngest.experimental.sentry_middleware import SentryMiddleware
import sentry_sdk
# Initialize Sentry as usual wherever is appropriate
sentry_sdk.init(
traces_sample_rate=1.0,
profiles_sample_rate=1.0,
)
inngest_client = inngest.Inngest(
app_id="my-app",
middleware=[SentryMiddleware],
)