(New in version : 0.6.3 )
The Tornado integration adds support for the Tornado Web Framework. A Tornado version of 5 or greater and Python 3.7 or greater is required.
$ pip install --upgrade sentry-sdk==0.6.6
Initialize the SDK before starting the server:
import sentry_sdk from sentry_sdk.integrations.tornado import TornadoIntegration sentry_sdk.init( dsn="___PUBLIC_DSN___", integrations=[TornadoIntegration()] ) # Your app code here, without changes class MyHandler(...): ...
The Tornado integration will be installed for all of your apps and handlers.
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
Note: The tornado integration currently does not capture formdata. See the relevant GitHub issue
Logging with any logger will create breadcrumbs when the Logging integration is enabled (done by default).