-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
Make Inclusion of weblate logs in Sentry configurable #4673
Comments
The reason for this is that errors are sent to Sentry as an exception and logged. The log then needs to be ignored for Sentry to avoid duplication of all such errors. |
@nijel just to make sure I understand you, the current Sentry workflow is this:
Sentry has been set to ignore the "weblate" logger because otherwise both of these steps would produce a Sentry entry, so a single issue would be represented multiple times. Is my understanding correct? |
To be more precise let's look at the code: weblate/weblate/utils/errors.py Lines 59 to 72 in 3ebae56
The exception is sent to Sentry (if configured, lines 59-66) and logged (line 72). You don't want both to appear in Sentry as that will create two distinct events there. On the other side the error should appear in the log even when using Sentry to make logging consistent with non-Sentry setup and to allow to see things locally on the system. What could be way to improve it is to use dedicated logger for this kind of logs and ignore only that for Sentry. |
Thank you for your report, the issue you have reported has just been fixed.
|
Is your feature request related to a problem? Please describe.
We would like to use Sentry to monitor events generated by weblate. It appears that the sentry sdk is currently configured to ignore the
weblate
andweblate.celery
loggers. As a result, the Sentry data paints and incomplete picture.Describe the solution you'd like
A config variable is introduced which allows users to choose whether or not data from the
weblate
andweblate.celery
loggers is sent to Sentry.Describe alternatives you've considered
We have considered forwarding log data to Sentry using a separate process, but we have been unable to find the logs in their default locations (However, it is possible that they were configured to appear elsewhere, the developer who configured the pod is out sick today).
Additional context
Above the code in question (
weblate/utils/errors.py:93-5
), there is a comment:It is not immediately clear why data sent to Sentry could not also be reported as an error. In fact, your own documentation suggests using Sentry to monitor weblate and celery errors, and yet both of these loggers are explicitly being ignored. What exactly does "built-in support" mean in this context?
The text was updated successfully, but these errors were encountered: