(New in version 0.3.6 )
The Sanic integration adds support for the Sanic Web Framework.
$ pip install --upgrade sentry-sdk==0.6.2
To configure the SDK, initialize it with the integration before or after your app has been initialized:
import sentry_sdk from sentry_sdk.integrations.sanic import SanicIntegration from sanic import Sanic sentry_sdk.init( dsn="___PUBLIC_DSN___", integrations=[SanicIntegration()] ) app = Sanic(__name__)
The Sanic integration will be installed for all of your apps.
All exceptions leading to a Internal Server Error are reported.
Request data is attached to all events: HTTP method, URL, headers, formdata, JSON payloads. Raw bodies and multipart file uploads are excluded. Personally identifiable information (such as user ids, usernames, cookies, authorization headers, ip addresses) is excluded unless
send_default_piiis set to
Logging with any logger will create breadcrumbs when the Logging integration is enabled (done by default).