Coder Social home page Coder Social logo

sentry-on-heroku's Introduction

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.

Quick setup

Click the button below to automatically set up the Sentry in an app running on your Heroku account.

Deploy

Finally, you need to setup your first user:

heroku run "sentry --config=sentry.conf.py createuser" --app YOURAPPNAME

Manual 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 APP_NAME
    
  2. Add PostgresSQL to the application:

    heroku addons:create heroku-postgresql:hobby-dev
    
  3. Add Redis to the application:

    heroku addons:create heroku-redis:premium-0
    
  4. Set Django's secret key for cryptographic signing and Sentry's shared secret for global administration privileges:

    heroku config:set SECRET_KEY=$(python -c "import base64, os; print(base64.b64encode(os.urandom(40)).decode())")
    
  5. Set the absolute URL to the Sentry root directory. The URL should not include a trailing slash. Replace the URL below with your application's URL:

    heroku config:set SENTRY_URL_PREFIX=https://sentry-example.herokuapp.com
    
  6. Deploy Sentry to Heroku:

    git push heroku master
    
  7. Sentry's database migrations are automatically run as part of the Heroku release phase

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

    heroku run "sentry --config=sentry.conf.py createuser"
    

That's it!

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:create sendgrid
    
  2. Set the reply-to email address for outgoing mail:

    heroku config:set [email protected]
    

sentry-on-heroku's People

Contributors

3zcurdia avatar atmos avatar biggleszx avatar crccheck avatar dmishe avatar egrim avatar jmcarp avatar jpvanhal avatar nrako avatar sibson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentry-on-heroku's Issues

Regenerate sentry config

It looks like the default sentry config file has changed a bit since the one here was generated--a bunch of options that sentry used to accept are gone. We should probably regenerate sentry.conf.py and config.yml so they're up to date.

Unable to send mail

I set up my app using the 'Deploy to Heroku' button. It seems to work fine, but I noticed it wasn't sending mail, so I went to https://MYAPPNAME.herokuapp.com/manage/status/mail/, clicked the 'Send a test email to ...' button, and recived the following error:

'module' object has no attribute 'sslwrap'

Unfortunately the error does not appear to be logged to the Heroku log, so I can't say any more than that at the moment.

Celery is using 100% CPU

I have not changed anything in config and just used what was here. Celeryd is using 100% cpu and I don't know how to fix this

sentry 8.20.0 on heroku: Cannot find `node` executable

I am trying to get the current sentry release 8.20.0 running on heroku.

It was working with the older versions, but with this I get an error to install node (see backtrace).

Any ideas how to solve this?

remote:          Running setup.py develop for sentry
remote:            Complete output from command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/app/.heroku/src/sentry/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
remote:            running develop
remote:            running egg_info
remote:            writing requirements to src/sentry.egg-info/requires.txt
remote:            writing src/sentry.egg-info/PKG-INFO
remote:            writing top-level names to src/sentry.egg-info/top_level.txt
remote:            writing dependency_links to src/sentry.egg-info/dependency_links.txt
remote:            writing entry points to src/sentry.egg-info/entry_points.txt
remote:            reading manifest file 'src/sentry.egg-info/SOURCES.txt'
remote:            reading manifest template 'MANIFEST.in'
remote:            warning: no files found matching 'src/sentry/assets.json'
remote:            warning: no files found matching '*.json' under directory 'src/sentry/integration-docs'
remote:            writing manifest file 'src/sentry.egg-info/SOURCES.txt'
remote:            running build_ext
remote:            Creating /tmp/build_8f1d5fab60be2b61c24fdb3a7be9fde7/.heroku/python/lib/python2.7/site-packages/sentry.egg-link (link to src)
remote:            Adding sentry 8.20.0 to easy-install.pth file
remote:            Installing sentry script to /app/.heroku/python/bin
remote:
remote:            Installed /app/.heroku/src/sentry/src
remote:            running build_integration_docs
remote:            initializing git submodules
remote:            command failed [node --version] via [/app/.heroku/src/sentry]
remote:            Cannot find `node` executable. Please install node` and try again.

Thanks for your help!

Robin

Mandrill are withdrawing their plans on Heroku

I received this email yesterday:

The Mandrill team has chosen not to continue development of this add-on. It is not possible to migrate your existing account directly to Mandrill; a new account will need to be created.

The Mandrill add-on will be removed from all apps in 60 days. We advise you to remove it yourself before that either via the Dashboard or via the CLI.

Please consider using SendGrid or another add-on in Elements for your app's email needs. Contact our support team if you run into any problems.

how to add new plugins?

in Docker deploy, I have to add plugins to requirements.txt and build the image. in regular server install, I just do pip install

how can I add plugins on heroku?

Restore mandrill

Even though the mandril addon has been shut down on heroku, users might still want to use an independent mandrill account. I'm using this repo (with a few modifications) to deploy to cloud foundry, using mandrill to send mail. Would you be willing to revert 3d94724 ?

SuspiciousOperation: Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS

After following the readme step by step I'm getting the following error.

2013-10-19T15:40:33.640266+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/django/middleware/common.py", line 57, in process_request
2013-10-19T15:40:33.640266+00:00 app[web.1]:     host = request.get_host()
2013-10-19T15:40:33.640266+00:00 app[web.1]: SuspiciousOperation: Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): derpityderpderp.herokuapp.com
2013-10-19T15:40:33.640266+00:00 app[web.1]: Traceback (most recent call last):
2013-10-19T15:40:33.640266+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/django/http/request.py", line 72, in get_host
2013-10-19T15:40:33.640266+00:00 app[web.1]: Internal Server Error: /_static/sentry/images/favicon.ico
2013-10-19T15:40:33.640266+00:00 app[web.1]:     "Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): %s" % host)
2013-10-19T15:40:33.640266+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py", line 92, in get_response
2013-10-19T15:40:33.640266+00:00 app[web.1]:     response = middleware_method(request)

Deployment fails

Hi,
thanks for putting this together. I'm running into an issue when using heroku button to deploy. Here is the trace. Any idea?

Traceback (most recent call last):
  File "/app/.heroku/python/lib/python2.7/site-packages/logan/runner.py", line 116, in settings_callback
    'settings': settings,
  File "/app/.heroku/python/lib/python2.7/site-packages/sentry/utils/runner.py", line 317, in initialize_app
    validate_backends()
  File "/app/.heroku/python/lib/python2.7/site-packages/sentry/utils/runner.py", line 328, in validate_backends
    app.tsdb.validate()
  File "/app/.heroku/python/lib/python2.7/site-packages/sentry/tsdb/redis.py", line 74, in validate
    raise InvalidConfiguration(unicode(e))
InvalidConfiguration: max number of clients reached

Missing or renamed add-on

Getting this error when trying to deploy:

No such add-on plan.

No further info on which add-on is missing.

No event showing

Hi, I installed using the Heroku button. Logged in, copied and pasted the DSN URL to my other app, tried to throw 404 error but no event showing. What did I miss? Please help.

Combined worker+beat dyno for free tier

Heroku's free tier only allows one worker dyno to run at a time. Since celery can process multiple queues in the same process, I would suggest adding a combined process to Procfile that runs both worker and beat queues at once.

How to install plugins?

I'm trying to install the hipchat plugin for sentry but after I run "pip install sentry-hipchat" in the heroku cli its not showing up in the integrations panel. I've tried restarting the server but with the same result.

Just curious if you've run into this with the heroku install before...

heroku can't find sentry executable

Hi, im getting the following errors:

after step 4:
File "<string>", line 1 import base64, os; print base64.b64encode(os.urandom(40)) ^ SyntaxError: invalid syntax Setting config vars and restarting ampido-sentry... done, v6 SENTRY_KEY:

and after step 7:
Running sentry --config=sentry.conf.py upgrade attached to terminal... up, run.5436 bash: sentry: command not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.