Log more data on failed clean#2180
Merged
Merged
Conversation
This also updates the log string to use % based format strings, rather than a mix of f-string and % string which caused the %r to not work.
This is to aid in the debugging on an issue we have encountered
wookie184
approved these changes
May 22, 2022
MarkKoz
reviewed
May 28, 2022
Comment on lines
+80
to
+85
| add_breadcrumb( | ||
| category="api_error", | ||
| message=str(e), | ||
| level="error", | ||
| data=deletedmessage_set, | ||
| ) |
Contributor
There was a problem hiding this comment.
There's a discrepancy in the documentation of this function: https://getsentry.github.io/sentry-python/api.html?highlight=add_breadcrumb#sentry_sdk.add_breadcrumb vs https://docs.sentry.io/platforms/python/enriching-events/breadcrumbs/#manual-breadcrumbs
I don't know how to test this so let's just try and fix it if it doesn't work.
Member
Author
There was a problem hiding this comment.
Yea, I was following the latter. I guess we can just find out.
MarkKoz
approved these changes
May 28, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds request data as a sentry breadcrumb when clean cog fails, so we can understand the data that is causing the site api to error.
This also updates the log string to use % based format strings, rather than a mix of f-string and % string which caused the %r to not work.