Open canassa opened 8 years ago
Can you print out object.__repr__(self)
in that should_capture
method and copy paste the output here?
@mitsuhiko
Sure, I added this line to it:
def should_capture(self, exc_info):
self.logger.error('arcoiro {}'.format(object.__repr__(self)))
And here is the output:
23/Sep/2016:10:03:00 +0200 ERROR arcoiro <raven.base.Client object at 0x7f470c30ec88>
23/Sep/2016:10:03:00 +0200 ERROR arcoiro <myproject.infra.utils.RavenClient object at 0x7f4701659748>
I didn't mention this before but I am using the SENTRY_CLIENT
configuration to overwrite the raven client, I have this in my Django settings:
SENTRY_CLIENT = 'myproject.infra.utils.RavenClient'
And this is my custom client (in case it matters):
class RavenClient(DjangoClient):
"""
Adds the logging request_uuid identifier to the exception sent to
Sentry, it enables finding all logs related to a given exception.
"""
def build_msg(self, *args, **kwargs):
data = super().build_msg(*args, **kwargs)
log_data = getattr(threadlocal, 'log_data', None)
if log_data and 'request_uuid' in log_data:
data['extra']['request_uuid'] = log_data['request_uuid']
return data
any update here?
Hello,
I have a Django project using raven 5.27.1 and I setting the the
ignore_exception
like so:I also have a celery task that raises that exception:
My problem is that raven is not respecting my
ignore_exception
config and sending the exception to Sentry anyway. The problem seems to be that the should_capture is being executed twice, I added the following to log to it:And these are logs that I am seeing:
As you can see,
should_capture
was called twice, the first time the exclusion list was an empty set. I think this is causing the error to be sent to Sentry anyway