Python Pyramid application
I’ve setup sentry on own server and its up, I have added the required settings in my projects’s ini file. and I have introduced a code error example a key error, I see error stacktrace in the uwsgi logs and in application’s console in web but its not being recorded and shown on sentry web.
there are no error in sentry logs
please help on any pointer, I can debug further…
Python Pyramid application
It sounds like you’re not running the worker or cron processes.
thanks again Mat for prompt reply however, I had started them and tehy look like running
SENTRY_CONF=/etc/sentry sentry run worker &
SENTRY_CONF=/etc/sentry sentry run cron &
and no errors there
-------------- celery@ip-172-31-39-142 v3.1.18 (Cipater)
---- **** -----
— * *** * – Linux-3.13.0-36-generic-x86_64-with-Ubuntu-14.04-trusty
– * - **** —
- ** ---------- [config]
- ** ---------- .> app: sentry:0x7f05528b2ad0
- ** ---------- .> transport: redis://localhost:6379//
- ** ---------- .> results: disabled
- *** — * — .> concurrency: 2 (prefork)
– ******* ----
— ***** ----- [queues]
-------------- .> alerts exchange=default(direct) key=alerts
.> auth exchange=default(direct) key=auth
.> cleanup exchange=default(direct) key=cleanup
.> counters-0 exchange=counters(direct) key=
.> default exchange=default(direct) key=default
.> digests.delivery exchange=default(direct) key=digests.delivery
.> digests.scheduling exchange=default(direct) key=digests.scheduling
.> email exchange=default(direct) key=email
.> events.preprocess_event exchange=default(direct) key=events.preprocess_event
.> events.process_event exchange=default(direct) key=events.process_event
.> events.save_event exchange=default(direct) key=events.save_event
.> merge exchange=default(direct) key=merge
.> options exchange=default(direct) key=options
.> reports.deliver exchange=default(direct) key=reports.deliver
.> reports.prepare exchange=default(direct) key=reports.prepare
.> search exchange=default(direct) key=search
.> stats exchange=default(direct) key=stats
.> triggers-0 exchange=triggers(direct) key=
.> update exchange=default(direct) key=update
. broker -> redis://localhost:6379//
. loader -> celery.loaders.app.AppLoader
. scheduler -> celery.beat.PersistentScheduler
. db -> /tmp/sentry-celerybeat
. logfile -> [stderr]@%INFO
. maxinterval -> now (0s)
do I need to specifically make call to cpatureException all the routes in whole code-base like request.raven.captureException() ?
like mentioned here as separate raven client: https://github.com/thruflo/pyramid_raven
followed up this too: https://docs.sentry.io/server/installation/python/#configure-supervisord
but no luck
I can’t really say other than “misconfiguration” or helping to debug yourself. Are the events even being sent to the server? Is the SDK firing off the event and making the HTTP request at all? or is that erroring? If not, this is misconfiguration on your SDK.
If it is making the request to your Sentry server, is it being filtered or dropped? If so, the SDK would likely log this error since it was a 4xx.
If it’s successfully returning back a 200 OK, then the problem is misconfiguration with your queue and workers. The event gets first written into the queue, which is then pulled by the workers to do processing. So a possibility here is that it’s writing into a queue on one server, but the workers are reading from a different server, etc.
Other than that, there’s not much I can help with.
thanks a lot Matt for the patience. but to my surprise, with the same configuration, its started working with some issues which i’m trying to resolve now like either multiple post for same event (2 with Error category & 2 with Fatal) or no post at all but yes looks like it has to do with the queue which I can debug debug further, can you please help me with the default log file path where it writes (ubuntu 14.4) because I can’t see them in syslog file
my settings in supervisord.conf is:
[program:sentry-cron] directory=/www/sentry/ environment=SENTRY_CONF="/etc/sentry" command=/www/sentry/bin/sentry run cron autostart=true autorestart=true redirect_stderr=true stdout_logfile=syslog stderr_logfile=syslog