-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce logging to sentry #5054
Reduce logging to sentry #5054
Conversation
Are the exceptions defined in |
@@ -266,6 +266,9 @@ def USE_PROMOS(self): # noqa | |||
}, | |||
} | |||
|
|||
# Sentry | |||
SENTRY_CELERY_IGNORE_EXPECTED = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This setting comes from https://docs.sentry.io/clients/python/integrations/django/#additional-settings (just linking for reference)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
I should have added this in the description.
Looks good. Thanks! |
I suppose that we should remove the logic that I wrote some time ago if we are going in this direction: |
Or, at least, we should think about what to do with them. Also, does Celery provides a way to "log them as WARNING" or it does log them but do not send them to Sentry only? |
With ref to comment: I tried making a simple task with celery and using # tasks.py
from celery import Celery
app = Celery('tasks', broker='pyamqp://guest@localhost//')
@app.task(throws=(ZeroDivisionError,))
def divide(x, y):
if y == 0:
raise ZeroDivisionError("Divide by zero")
return x/y And when i tried
And as per the Sentry docs, this must not be logged. |
Related Issues - #4978, #3856, #4590,