These docs are a work-in-progress and are currently undergoing a major rewrite!
Forge Pro


Sentry is an error monitoring service that we think has a great Django integration. It allows you to debug production errors and also has some performance monitoring features that can be enabled.



# Enable the error page feedback widget

In your base.html, load sentry and include the sentry_js tag:

<!-- base.html -->
{% load sentry %}
<!doctype html>
<html lang="en">
      {% sentry_js %}

To enable Sentry in production, add the SENTRY_DSN to your Heroku app:

heroku config:set SENTRY_DSN=<your-DSN>


By default, you'll get both Python (backend) and JavaScript (frontend) error reporting that includes PII (user ID, username, and email). You can further tweak the Sentry settings with these environment variables:

  • SENTRY_RELEASE - the commit sha by default
  • SENTRY_ENVIRONMENT - "production" by default
  • SENTRY_PII_ENABLED - true by default, set to false to disable sending PII
  • SENTRY_JS_ENABLED - true by default, set to false to disable JS error reporting

Error page feedback widget

By adding the SentryFeedbackMiddleware to your MIDDLEWARE, your 500.html server error page will include the Sentry feedback widget: