-
Notifications
You must be signed in to change notification settings - Fork 451
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
Reports to Sentry are silently ignored on some Tribler installations #7966
Labels
Comments
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 12, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 12, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 12, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 12, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 12, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 12, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 12, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 12, 2024
kozlovsky
added a commit
that referenced
this issue
Apr 18, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 18, 2024
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Apr 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Recently, I discovered that when an error occurs on my machine and the Feedback dialog suggests sending the report to the Tribler developer, clicking the "SEND REPORT" button does nothing. The confirmation box with the message "Successfully sent the report! Thanks for your contribution" shows, but no errors appear on the Sentry server.
Specifying the
debug=True
option when callingsentry_sdk.init(...)
allows me to see Sentry logs configured weirdly:debug=True
option but too verbose. Without thedebug=True
option, even error-level log records from the Sentry are silenced.stderr
, duplicating the same log messages instdout
andstderr
. The formatting of these log records in thestderr
output was inconsistent with Tribler logs.With enabled Sentry logs, the following log record appeared in stderr:
It allowed me to investigate the reason for the error. As it turns out,
SentryScrubber
produced a corrupted error report that was then rejected by the Sentry server.SentryScrubber
tries to remove sensitive information from the error report. It generates a set of sensitive strings with corresponding pseudo-random substitutes. For example, a username"John"
may be replaced with the string"<foo>"
, and a machine name"JOHN-PC"
may be replaced with the string"<bar>"
. Then, using regular expressions,SentryScrubber
replaces corresponding substrings in all places of the error report.As it turns out, the reason for the problem was that sometimes
SentryReported
decides to replace an empty string""
with the substitution"<>"
and applies this replacement to all possible substrings. As a result, even elements added to the report by Sentry itself were transformed; for example, the identifier valuewas transformed into
and all other string elements of the report were changed in the same way.
As a simple fix,
SentryScrubber
should stop considering empty strings as a potential target for replacement. After such a fix, with the current logic,SentryScrubber
still has a chance to corrupt the report if some sensitive value accidentally matches the Sentry technical field value, but the chance of corruption becomes much lower.As another change, it is worthwhile to configure Sentry logs in the following way:
The text was updated successfully, but these errors were encountered: