-
Notifications
You must be signed in to change notification settings - Fork 0
[CLEAN] Synthetic Benchmark PR #103425 - fix(grouping): Ensure custom titles use the correct frame #5
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
base: base_pr_103425_20251204_2931
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
User description
Benchmark PR getsentry#103425
Type: Clean (correct implementation)
Original PR Title: fix(grouping): Ensure custom titles use the correct frame
Original PR Description: This fixes a bug caused by getsentry#103268, which moved server-side fingerprinting before the call to
normalize_stacktraces_for_grouping. While it's 99% true that they're unrelated processes (and therefore can happen in any order), the one exception to that is the handling of custom fingerprints which also include title information. In cases where the custom title includes any of the frame variables (function,module,package, orabs_path), the frame that gets used is the top in-app frame in the stacktrace. But in-app rules are applied as part ofnormalize_stacktraces_for_grouping, so having it not run until after the custom title is set is obviously a problem.To fix this, the handling of such titles (in other words, the filling-in of the variables and adding of the result to the event) has been moved to live alongside the filling-in-of-the-variables which we do for the fingerprint itself, which is after in-app rules have been applied. A snapshot test illustrating the fix has also been added, showing that it's not the top frame but the top in-app frame which is used for the title.
(Why didn't I just switch the order of the two operations back, you ask? Because switching the order was the first step towards absorbing the normalization into variant calculation call which comes immediately after it, so server-side fingerprinting needed to get out of its original spot between them.)
Original PR URL: getsentry#103425
PR Type
Bug fix
Description
Move custom title resolution after stacktrace normalization
Ensure custom titles use correct in-app frame, not top frame
Add snapshot test validating title uses top in-app frame
Refactor title handling into dedicated function for clarity
Diagram Walkthrough
File Walkthrough
api.py
Defer custom title resolution to after normalizationsrc/sentry/grouping/api.py
apply_server_side_fingerprintingfunction
_apply_custom_title_if_neededfunction to resolve titlesafter normalization
get_grouping_variants_for_eventafterstacktrace normalization
get_pathutility function__init__.py
Apply custom titles in test event creationtests/sentry/grouping/init.py
expand_title_templateandget_pathutilities_manually_save_eventto apply custom titles afterfingerprinting
create_eventto apply custom titles after fingerprintingfingerprint-title-uses-top-in-app-frame.json
Add test input for custom title with in-app frametests/sentry/grouping/fingerprint_inputs/fingerprint-title-uses-top-in-app-frame.json
template
do_dog_stuffmodule with title using{{ function}}variableselection
fingerprint_title_uses_top_in_app_frame.pysnap
Add snapshot test for in-app frame title resolutiontests/sentry/grouping/snapshots/test_fingerprinting/test_event_hash_variant/fingerprint_title_uses_top_in_app_frame.pysnap
throw_ball(top in-app frame) notfetch(top frame)