getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

How to timeout captureException #1163

Open aericson opened 6 years ago

aericson commented 6 years ago

Maybe there is another solution to this problem.

We have a django view that in some part of the code has a:

try:
...
except Exception:
    # we want the view to log to sentry but continue since the code inside the `try` block is not essential
    sentry_client.captureException()

We had a bug that caused an exception on every new request. I might be wrong, but it seems like captureException locks until a previous captureException call is done. This causes all requests to delay and end up adding up to absurd response times.

Is there a way to set a timeout the captureException or defer that to a celery task?

We are running raven 6.0.0.

Would really appreciate some guidance on how to solve this problem.

Thanks!

kardaj commented 6 years ago

I ran into this problem today, it would be great if we could set a timeout. The same call can hang for hours.