Sentry is a realtime event logging and aggregation platform. At its core it specializes in monitoring errors and extracting all the information needed to do a proper post-mortem without any of the hassle of the standard user feedback loop.
Follow the steps below to get Sentry up and running on Heroku:
Create a new Heroku application. Replace "APP_NAME" with your application's name:
heroku apps:create --stack cedar APP_NAME
Add database to the application:
heroku addons:add heroku-postgresql:dev
Set the heroku app name (and custom domain if needed)
heroku config:add HEROKU_APP_NAME='my_app_name' heroku config:add CUSTOM_DOMAIN='.customdomain.com'
Set Sentry's shared secret for global administration privileges:
heroku config:add SENTRY_KEY='0123456789abcde'
You may use the following Python code to generate a good unique key for the above:
>>> import base64 >>> import os >>> base64.b64encode(os.urandom(40)) 'nIumxPtjDuHunpX2D+LP27l8WX967DgjBRiSLz/XrfAp491bu3pnzw=='
Deploy Sentry to Heroku:
git push heroku master
Run Sentry's database migrations:
heroku run "sentry --config=sentry.conf.py upgrade"
Create a user account for yourself:
heroku run "sentry --config=sentry.conf.py createsuperuser"
Restart the app so everything is up-to-date:
heroku restart
That's it! Open your newly created sentry server: heroku open
Follow the steps below, if you want to enable Sentry's email notifications:
Add SendGrid add-on to your Heroku application:
heroku addons:add sendgrid
Set the reply-to email address for outgoing mail:
heroku config:add SERVER_EMAIL=sentry@example.com
Set the email addresses that should be notified:
heroku config:add ADMINS=john.matrix@example.com,jack.daniels@example.com