Skip to content

dmishe/sentry-on-heroku

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentry on Heroku

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.

Basic setup

Follow the steps below to get Sentry up and running on Heroku:

  1. Create a new Heroku application. Replace "APP_NAME" with your application's name:

    heroku apps:create --stack cedar APP_NAME
    
  2. Add database to the application:

    heroku addons:add heroku-postgresql:dev
    
  1. 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'

  1. 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=='
    
  2. Deploy Sentry to Heroku:

    git push heroku master
    
  3. Run Sentry's database migrations:

    heroku run "sentry --config=sentry.conf.py upgrade"
    
  4. Create a user account for yourself:

    heroku run "sentry --config=sentry.conf.py createsuperuser"
    
  5. Restart the app so everything is up-to-date:

    heroku restart
    

That's it! Open your newly created sentry server: heroku open

Email notifications

Follow the steps below, if you want to enable Sentry's email notifications:

  1. Add SendGrid add-on to your Heroku application:

    heroku addons:add sendgrid
    
  2. Set the reply-to email address for outgoing mail:

    heroku config:add SERVER_EMAIL=sentry@example.com
    
  3. Set the email addresses that should be notified:

    heroku config:add ADMINS=john.matrix@example.com,jack.daniels@example.com
    

About

Sentry on Heroku

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%