Skip to content

feat(grouping): Add helper to combine hints #91833

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

Merged
merged 3 commits into from
May 20, 2025

Conversation

lobsterkatie
Copy link
Member

When a frame is affected by both an in-app rule and a contributes rule, the split enhancements allow us to get both hints, rather than having one clobber the other (as is the case now). That does not mean, however, that both hints are always relevant. This PR adds a helper, _combine_hints, to appropriately use or ignore each hint, and combine them when necessary. It's not yet used, but will be when we switch to actually using the split enhancements, rather than just running them alongside the non-split ones.

Note that _combine_hints needs the final contributes value to already be in place when it runs, so this also moves the setting of that value earlier in assemble_stacktrace_component.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 16, 2025
Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

⚠️ Parser warning

The parser emitted a warning. Please review your JUnit XML file:

Warning while parsing testcase attributes: Limit of string is 1000 chars, for name, we got 2083 at 1:156897 in /home/runner/work/sentry/sentry/.artifacts/pytest.junit.xml
Files with missing lines Patch % Lines
src/sentry/grouping/enhancer/__init__.py 87.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #91833      +/-   ##
==========================================
- Coverage   87.64%   87.64%   -0.01%     
==========================================
  Files       10350    10350              
  Lines      586586   586605      +19     
  Branches    22574    22574              
==========================================
+ Hits       514115   514129      +14     
- Misses      72026    72031       +5     
  Partials      445      445              

@lobsterkatie lobsterkatie marked this pull request as ready for review May 16, 2025 21:36
@lobsterkatie lobsterkatie requested a review from a team as a code owner May 16, 2025 21:36
@lobsterkatie lobsterkatie merged commit 3f43ac8 into master May 20, 2025
60 checks passed
@lobsterkatie lobsterkatie deleted the kmclb-add-helper-to-combine-hints branch May 20, 2025 17:35
andrewshie-sentry pushed a commit that referenced this pull request May 20, 2025
When a frame is affected by both an in-app rule and a contributes rule, the split enhancements allow us to get both hints, rather than having one clobber the other (as is the case now). That does not mean, however, that both hints are always relevant. This PR adds a helper, `_combine_hints`, to appropriately use or ignore each hint, and combine them when necessary. It's not yet used, but will be when we switch to actually using the split enhancements, rather than just running them alongside the non-split ones.

Note that `_combine_hints` needs the final `contributes` value to already be in place when it runs, so this also moves the setting of that value earlier in `assemble_stacktrace_component`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants