Skip to content

Commit 3bceda3

Browse files
authored
ref(grouping): Include variant.contributes in grouping info JSON (#100893)
This adds each variant's `contributes` value to the JSON used in the grouping info section of the issue details page. Once this is deployed, a follow-up PR will switch the front end code to use this value (rather than the presence of a hash value) to determine whether or not the variant contributes, which will make handling certain special cases easier. (We'll be able to force a variant to show without incurring all of the side effects of adding a hash value.)
1 parent 8caa37e commit 3bceda3

File tree

219 files changed

+646
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+646
-216
lines changed

src/sentry/grouping/variants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def as_dict(self) -> dict[str, Any]:
5656
"description": self.description,
5757
"hash": self.get_hash(),
5858
"hint": self.hint,
59+
"contributes": self.contributes,
5960
}
6061
rv.update(self._get_metadata_as_dict())
6162
return rv

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/actix.pysnap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-09-24T22:53:01.986683+00:00'
2+
created: '2025-10-03T16:56:42.712057+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
@@ -2604,6 +2604,7 @@ source: tests/sentry/grouping/test_grouping_info.py
26042604
"threads:v1"
26052605
]
26062606
},
2607+
"contributes": true,
26072608
"description": "in-app exception stacktrace",
26082609
"hash": "738e7d2503464bc264b4f791286f5122",
26092610
"hint": null,
@@ -5210,6 +5211,7 @@ source: tests/sentry/grouping/test_grouping_info.py
52105211
"threads:v1"
52115212
]
52125213
},
5214+
"contributes": true,
52135215
"description": "exception stacktrace",
52145216
"hash": "19a96e0438d28e48355653def82f887a",
52155217
"hint": null,

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/android_anr.pysnap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-09-24T22:53:02.050490+00:00'
2+
created: '2025-10-03T16:56:42.740562+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
@@ -3933,6 +3933,7 @@ source: tests/sentry/grouping/test_grouping_info.py
39333933
"threads:v1"
39343934
]
39353935
},
3936+
"contributes": false,
39363937
"description": "in-app",
39373938
"hash": null,
39383939
"hint": "ignored because system exception takes precedence",
@@ -7868,6 +7869,7 @@ source: tests/sentry/grouping/test_grouping_info.py
78687869
"threads:v1"
78697870
]
78707871
},
7872+
"contributes": true,
78717873
"description": "exception stacktrace",
78727874
"hash": "2552498cfe69a6ddf1dcdde5440ce9c3",
78737875
"hint": null,

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/aspnetcore.pysnap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-09-24T22:53:02.075150+00:00'
2+
created: '2025-10-03T16:56:42.762805+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
@@ -1092,6 +1092,7 @@ source: tests/sentry/grouping/test_grouping_info.py
10921092
"threads:v1"
10931093
]
10941094
},
1095+
"contributes": true,
10951096
"description": "in-app exception stacktrace",
10961097
"hash": "228c649a3aa0901622c0a0e66ab0522c",
10971098
"hint": null,
@@ -1136,6 +1137,7 @@ source: tests/sentry/grouping/test_grouping_info.py
11361137
"threads:v1"
11371138
]
11381139
},
1140+
"contributes": false,
11391141
"description": "default",
11401142
"hash": null,
11411143
"hint": "ignored because app/system exception takes precedence",
@@ -2230,6 +2232,7 @@ source: tests/sentry/grouping/test_grouping_info.py
22302232
"threads:v1"
22312233
]
22322234
},
2235+
"contributes": true,
22332236
"description": "exception stacktrace",
22342237
"hash": "4ccd0f1953483581ba360c7518f90332",
22352238
"hint": null,

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/block_invoke.pysnap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-09-24T22:53:02.095327+00:00'
2+
created: '2025-10-03T16:56:42.779301+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
@@ -142,6 +142,7 @@ source: tests/sentry/grouping/test_grouping_info.py
142142
"threads:v1"
143143
]
144144
},
145+
"contributes": true,
145146
"description": "in-app thread stacktrace",
146147
"hash": "ff6c4ee7c54f118a9647ee86f0c2b0b0",
147148
"hint": null,
@@ -186,6 +187,7 @@ source: tests/sentry/grouping/test_grouping_info.py
186187
"threads:v1"
187188
]
188189
},
190+
"contributes": false,
189191
"description": "default",
190192
"hash": null,
191193
"hint": "ignored because app threads take precedence",
@@ -330,6 +332,7 @@ source: tests/sentry/grouping/test_grouping_info.py
330332
"threads:v1"
331333
]
332334
},
335+
"contributes": false,
333336
"description": "system",
334337
"hash": null,
335338
"hint": "ignored because app threads take precedence",

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/bugly.pysnap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-09-24T22:53:02.113693+00:00'
2+
created: '2025-10-03T16:56:42.797686+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
@@ -305,6 +305,7 @@ source: tests/sentry/grouping/test_grouping_info.py
305305
"threads:v1"
306306
]
307307
},
308+
"contributes": false,
308309
"description": "in-app",
309310
"hash": null,
310311
"hint": "ignored because system exception takes precedence",
@@ -612,6 +613,7 @@ source: tests/sentry/grouping/test_grouping_info.py
612613
"threads:v1"
613614
]
614615
},
616+
"contributes": true,
615617
"description": "exception stacktrace",
616618
"hash": "d9c9b0f9ba46e32fddd7cd1512fad235",
617619
"hint": null,

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/built_in_fingerprint_chunkload_error.pysnap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-09-24T22:53:02.166722+00:00'
2+
created: '2025-10-03T16:56:42.837794+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
@@ -102,13 +102,15 @@ source: tests/sentry/grouping/test_grouping_info.py
102102
"threads:v1"
103103
]
104104
},
105+
"contributes": false,
105106
"description": "in-app",
106107
"hash": null,
107108
"hint": "ignored because built-in fingerprint takes precedence",
108109
"key": "app",
109110
"type": "component"
110111
},
111112
"built_in_fingerprint": {
113+
"contributes": true,
112114
"description": "Sentry defined fingerprint",
113115
"hash": "5d731dcf8ecc4f042eeacf528d8d8da9",
114116
"hint": null,
@@ -217,6 +219,7 @@ source: tests/sentry/grouping/test_grouping_info.py
217219
"threads:v1"
218220
]
219221
},
222+
"contributes": false,
220223
"description": "exception stacktrace",
221224
"hash": null,
222225
"hint": "ignored because built-in fingerprint takes precedence",

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/built_in_fingerprint_chunkload_error_hybrid_fingerprint.pysnap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-09-24T22:53:02.139683+00:00'
2+
created: '2025-10-03T16:56:42.816823+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
@@ -102,6 +102,7 @@ source: tests/sentry/grouping/test_grouping_info.py
102102
"threads:v1"
103103
]
104104
},
105+
"contributes": false,
105106
"description": "in-app",
106107
"hash": null,
107108
"hint": "ignored because built-in fingerprint takes precedence",
@@ -113,6 +114,7 @@ source: tests/sentry/grouping/test_grouping_info.py
113114
"{{ default }}",
114115
"dogs are great"
115116
],
117+
"contributes": true,
116118
"description": "Sentry defined fingerprint",
117119
"hash": "5d731dcf8ecc4f042eeacf528d8d8da9",
118120
"hint": null,
@@ -221,6 +223,7 @@ source: tests/sentry/grouping/test_grouping_info.py
221223
"threads:v1"
222224
]
223225
},
226+
"contributes": false,
224227
"description": "exception stacktrace",
225228
"hash": null,
226229
"hint": "ignored because built-in fingerprint takes precedence",

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/callee_guaranteed.pysnap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-09-24T22:53:02.189532+00:00'
2+
created: '2025-10-03T16:56:42.858843+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
@@ -1070,6 +1070,7 @@ source: tests/sentry/grouping/test_grouping_info.py
10701070
"threads:v1"
10711071
]
10721072
},
1073+
"contributes": true,
10731074
"description": "in-app exception stacktrace",
10741075
"hash": "4ef1fb44d656c3be2a146971f2a222dc",
10751076
"hint": null,
@@ -2142,6 +2143,7 @@ source: tests/sentry/grouping/test_grouping_info.py
21422143
"threads:v1"
21432144
]
21442145
},
2146+
"contributes": true,
21452147
"description": "exception stacktrace",
21462148
"hash": "47481871aa8d5ab5729cf2db78ce3032",
21472149
"hint": null,

tests/sentry/grouping/snapshots/grouping_info/test_grouping_info/newstyle@2023_01_11/checksum_no_regex_match.pysnap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
2-
created: '2025-09-24T22:53:02.206227+00:00'
2+
created: '2025-10-03T16:56:42.876169+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouping_info.py
55
---
66
{
77
"hashed_checksum": {
88
"checksum": "de46d023e69b171b90ccf3ebca7aede4",
9+
"contributes": true,
910
"description": "hashed legacy checksum",
1011
"hash": "de46d023e69b171b90ccf3ebca7aede4",
1112
"hint": null,

0 commit comments

Comments
 (0)