Fix kombu crash when using sentry & setting parsing#1359
Merged
TimPansino merged 11 commits intomainfrom Apr 24, 2025
Merged
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1359 +/- ##
==========================================
+ Coverage 79.46% 79.90% +0.44%
==========================================
Files 204 204
Lines 22832 22842 +10
Branches 3618 3618
==========================================
+ Hits 18144 18253 +109
+ Misses 3500 3392 -108
- Partials 1188 1197 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
TimPansino
reviewed
Apr 17, 2025
TimPansino
reviewed
Apr 21, 2025
| return wrapped(*args, **kwargs) | ||
|
|
||
| bound_args = bind_args(wrapped, args, kwargs) | ||
| bound_args = bind_publish(*args, **kwargs) |
Contributor
There was a problem hiding this comment.
Suggested change
| bound_args = bind_publish(*args, **kwargs) | |
| try: | |
| bound_args = bind_publish(*args, **kwargs) | |
| except Exception: | |
| bound_args = None | |
| if not bound_args: | |
| return wrapped(*args, **kwargs) |
I'm worried this will crash on other versions of Kombu since we only test the latest. Can we wrap it in a try/except clause like so?
This could use an exception message logged to debug as well.
5ca3e3f to
164015e
Compare
TimPansino
reviewed
Apr 22, 2025
TimPansino
previously approved these changes
Apr 22, 2025
TimPansino
reviewed
Apr 24, 2025
TimPansino
approved these changes
Apr 24, 2025
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.

Overview
Because Sentry applies a proxy wrapper around the
Producer.publishmethod, when we tried to apply thebind_args, it did not pickup the wrapped signature correctly-the instance was missing and so the value for thebodywas set as the value ofself. Instead use a hardcoded bind to avoid this issue.Fix missing parsing of config file instrumentation settings.
This is a fix for #1347.