Monday, December 7, 2015

Sentry Installation in local

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/
vi /home//.sentry/ > you can review the file



easy_install -UZ sentry[postgres]
Creates postgres db for sentry

sentry --config=/home//.sentry/ upgrade

you may run into issue with redis connectivity - Connection refused

Check if redis is running -
$ redis-cli
Could not connect to Redis at 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

Now try to run the upgrade command -

It fails with following error -
Incompatible library version: requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0

the issue is with libxml2, I resolved using this stack overflow thread -

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 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