Skip to content

Conversation

jasonyuezhang
Copy link
Owner

In the grouping info section of the issue details page, there are a number of problems with the way we describe grouping methods. In some cases, the description is incomplete (just app or just system, rather than app _____ or system _____). In some cases, it's not very descriptive (modified _____ to indicate a hybrid fingerprint, when we could be a lot more specific about what "modified" means). In some cases, it's unclear (exception and exception stacktrace are different, but it's easy to get them confused). And in some cases there's no method listed at all, and it just shows up as default.

The root of all of these problems is that the description property only looks at contributing components, and only "major" components at that. It's also directly reflective of the particular implementation of our grouping system, which works great for computation purposes, but less well for human understanding purposes.

To fix these issues, this PR instead bases the description on a variant's key, which produces a different value for each possible grouping method, and which takes into account not only which components end up contributing to the final hash, but which components would contribute if each variant were looked at individually. It also provides a human-readable translation for each key rather than just concatenating component names together.

Because grouphash metadata uses the description property in its computations, its implementation has been left alone for now. Instead, the new description is looked up only when creating the JSON for the grouping info section.

Examples of before and after heading values (not an exhaustive list):

In-app -> Error Message
In-app -> Exception Stacktrace — In-app Frames
In-app -> Event-level Stacktrace — In-app Frames
System -> Exception Stacktrace — All Frames
System -> Thread Stacktrace — All Frames
Default -> Message
In-app Exception -> NSError
In-app Exception -> Error Message
In-app Exception -> Error Type
Stacktrace -> Event-level Stacktrace — All Frames
Modified In-app Exception -> Error Message and Custom Fingerprint

Copied from getsentry#101042
Original PR: getsentry#101042

Copy link

Improve Descriptions in Grouping Info Section Using Variant Keys

This PR updates the Grouping Info section within the issue details page in order to provide more specific, accurate, and human-readable descriptions for grouping methods. Instead of generating the description property from only the major contributing components in the grouping system, the new approach derives the description from each variant's key, factoring in both actual and potential contributing components. The new descriptions include a mapping for clear, user-facing names, and logic for stacktrace frame handling is enhanced to distinguish and annotate cases like 'in-app frames', 'all frames', or combined custom fingerprints. The description logic for grouphash metadata is left unchanged for now; updates only affect JSON generation in the grouping info API. All grouping info test snapshots have also been updated to reflect the new descriptions.

Key Changes

• Added the helper function _get_new_description() to src/sentry/grouping/grouping_info.py to generate human-friendly descriptions based on variant keys
• Updated get_grouping_info_from_variants() to use the new description logic for all non-legacy formats
• Expanded and standardized the set of descriptions mapped to variant keys (e.g., exception_message, exception_stacktrace, thread_stacktrace)
• Introduced logic to append '- in-app frames', '- all frames', or 'and custom fingerprint' to applicable descriptions
• Refreshed all grouping info test snapshot files (*.pysnap) to reflect the new descriptive output

Affected Areas

src/sentry/grouping/grouping_info.py
• Test snapshot files in tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/

This summary was automatically generated by @propel-code-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants