Sentry is error logging, aggregation and tracking package. (for both server side, and client side)
mkvirtualenv sentry
workon sentry
pip install sentry --upgrade
sentry init
It will ask for creating conf file in your parent user dir. e.g. /Users//.sentry/sentry.conf.py
vi /home/ /.sentry/sentry.conf.py > you can review the file
Set SENTRY_ADMIN_EMAIL and SENTRY_URL_PREFIX
SENTRY_ADMIN_EMAIL : ‘your@email.com’
SENTRY_URL_PREFIX: ‘http://127.0.0.1:9000’
easy_install -UZ sentry[postgres]
Creates postgres db for sentry
sentry --config=/home//.sentry/sentry.conf.py upgrade
you may run into issue with redis connectivity - 127.0.0.1:6379. Connection refused
Check if redis is running -
$ redis-cli
Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected>
That means redis is not running, open another terminal and run following command -
$ redis-server
Now if you run the previous command again -
$ redis-cli
redis 127.0.0.1:6379>
Now try to run the upgrade command -
It fails with following error -
Incompatible library version: etree.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
brew install libxml2
brew install libxslt
brew link libxml2 --force
brew link libxslt --force
It will create all required tables, default user (select it as super user)
Now start sentry -
sentry start
Go to http://127.0.0.1:9000/ to access the local sentry. Get configuration and setup in your project to see the errors get logged on this local sentry instance.
Happy logging!
No comments:
Post a Comment