Setting up error & performance monitoring¶
Hypha supports error tracking using https://sentry.io and comes pre-installed with
sentry-sdk. Once enabled, you will be able to log unhandled exceptions and manually logged errors.
Python Error Tracking¶
To enable Sentry to track python and Django Errors, set
SENTRY_DSN environment variable.
Add your sentry public key to
SENTRY_PUBLIC_KEY environment variable. This will
add lazy-loaded sdk from Sentry CDN to all the templates, and then initialize it.
You can set a comma separated
SENTRY_DENY_URLS environment variable to exclude any page from being tracked.
SENTRY_TRACES_SAMPLE_RATE to a value greater than
have already set
You can also set deployment environment using
SENTRY_ENVIRONMENT. This string is freeform and set to
production by default. A release can be associated with more than one environment to separate them in the UI (think staging vs production or similar)
If debug is enabled SDK will attempt to print out useful debugging information if something goes wrong with sending the event. The default is always false. It's generally not recommended to turn it on in production, though turning debug mode on will not cause any safety concerns.
Make use of
/hypha/settings/local.py and override
hypha/tempalates/base.html to add custom initialization code.
See https://docs.sentry.io/platforms/python/guides/django/configuration/ for more details.