The Tornado integration adds support for the Tornado Web Framework. A Tornado version of 5 or greater and Python 3.6 or greater is required.
Install sentry-sdk
from PyPI:
$ pip install --upgrade sentry-sdk
If you're on Python 3.6, you also need the aiocontextvars
package:
$ pip install --upgrade aiocontextvars
Initialize the SDK before starting the server:
import sentry_sdk
from sentry_sdk.integrations.tornado import TornadoIntegration
sentry_sdk.init(
dsn="YOUR-GLITCHTIP-DSN-HERE",
integrations=[TornadoIntegration()]
)
# Your app code here, without changes
class MyHandler(...):
...