-
Notifications
You must be signed in to change notification settings - Fork 568
ref(gnu-integration): make path optional #4688
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4688 +/- ##
==========================================
+ Coverage 85.04% 85.09% +0.05%
==========================================
Files 156 156
Lines 15858 15859 +1
Branches 2684 2684
==========================================
+ Hits 13486 13496 +10
+ Misses 1589 1584 -5
+ Partials 783 779 -4
|
| FUNCTION_RE = r"[^@]+?)\s+@\s+0x[0-9a-fA-F]+" | ||
|
|
||
| FRAME_RE = r""" | ||
| ^(?P<index>\d+)\.\s+(?P<function>{FUNCTION_RE}\s+in\s+(?P<package>.+)$ | ||
| ^(?P<index>\d+)\.\s+(?P<function>{FUNCTION_RE}(?:\s+in\s+(?P<package>.+))? |
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.
Potential bug: The `FUNCTION_RE` regex is syntactically incorrect, causing compilation to fail. This silently breaks the entire GNU backtrace integration, preventing stacktrace parsing.
- Description: The
FUNCTION_REvariable contains a malformed regular expression with an unbalanced parenthesis. When this is formatted into the mainFRAME_RE, it results in a regex that cannot be compiled byre.compile. Because this compilation happens inside acapture_internal_exceptions()block, there.erroris caught and suppressed. Consequently, the GNU backtrace integration silently fails to parse any backtraces, leading to a complete loss of this debugging functionality without any warning to the user. - Suggested fix: The
FUNCTION_REconstant is malformed with an extra parenthesis. It should be corrected tor'[^@]+?'. Consequently,FRAME_REmust be updated to explicitly include the address pattern (\s+@\s+0x[0-9a-fA-F]+) and correctly close thefunctioncapture group, ensuring the final regex is syntactically valid.
severity: 0.8, confidence: 0.95
Did we get this right? 👍 / 👎 to inform future reviews.
sentrivana
left a comment
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!
okay so I had to add a fix (getsentry/sentry-python#4688) to the earlier change (getsentry/sentry-python#4598) I made in the sentry-python sdk. so now I'm bumping the sentry-sdk to `2.35.0` to grab that fix. I added the `update_current_span ` convenience funtion that was also in this release getsentry/sentry-python#4673 **testing:** going to test this out in S4S first before moving on to de and us
I updated the GNU Integration in #4598 but I didn't make the path optional so if we didn't have the path included, then the stacktrace didn't get parsed:
So updated it so that regardless of whether the path is present it will get parsed