Repository navigation
Commit 2f5996c
feat(mcp): Support same-title and same-supergroup related issue types (#2475)
Sentry's `/organizations/{org}/issues/{id}/related/` endpoint now
supports two more relation types (`RelationType` in
`src/sentry/issues/related/types.py`):
- `same_title`: error issues in the same project whose events in the
last 14 days share this issue's event title. Grouping splits one cause
reached from several places into several issues, and stack trace
similarity misses those by design.
- `same_supergroup`: the other issues in this issue's Seer supergroup,
meaning issues in any project the user can read whose root cause
describes the same failure. It's `not_applicable` unless the org has
supergroups enabled.
Both are in `RELATED_ISSUE_TYPES`, so every response and output schema
accepts them.
**What each caller asks for:**
- `find_related_issues` asks for all types by default. Each
`relationTypes` entry reports the title `same_title` searched and the
supergroup's Seer summary (`meta.supergroup.title`). The supergroup ID
is parsed but left out of the output, because no tool takes it.
- `get_issue_details` (experimental mode) asks for every type except
`same_title`, because that type's issue search would run on every call.
- `update_issue`'s resolve side quest asks for every type.
`RELATION_LABELS` has labels for the new ones.
The project-scope filter already drops cross-project `same_supergroup`
issues in a project-scoped session.
**Deploy order:** the endpoint validates `type` against its choices and
returns 400 for an unknown one. If the Sentry changes that added
`same_title` and `same_supergroup` aren't deployed when this merges,
`find_related_issues` fails by default. `get_issue_details` and the
`update_issue` side quest quietly leave related issues out, since they
treat client errors as expected.
The new `investigations` type goes in a separate PR stacked on this one.
<!-- junior-request-attribution:start -->
via @Christinarlong.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3Aca4aac603e2acab8493205b20f5ef64e -->
--
[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Aca4aac603e2acab8493205b20f5ef64e)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Aca4aac603e2acab8493205b20f5ef64e/?project=4510944073809921)
<!-- junior-session-footer:end -->
---------
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Christina Long <60594860+Christinarlong@users.noreply.github.com>1 parent 0c3ab8c commit 2f5996c
9 files changed
Lines changed: 208 additions & 19 deletions
File tree
- packages/mcp-core/src
- api-client
- internal
- tools/catalog
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| 910 | + | |
| 911 | + | |
910 | 912 | | |
911 | 913 | | |
912 | 914 | | |
| |||
948 | 950 | | |
949 | 951 | | |
950 | 952 | | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
951 | 957 | | |
952 | 958 | | |
953 | 959 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
| 433 | + | |
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3116 | 3116 | | |
3117 | 3117 | | |
3118 | 3118 | | |
3119 | | - | |
| 3119 | + | |
3120 | 3120 | | |
3121 | 3121 | | |
3122 | 3122 | | |
| |||
3147 | 3147 | | |
3148 | 3148 | | |
3149 | 3149 | | |
3150 | | - | |
| 3150 | + | |
3151 | 3151 | | |
3152 | 3152 | | |
3153 | 3153 | | |
3154 | 3154 | | |
3155 | 3155 | | |
3156 | | - | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
3157 | 3163 | | |
3158 | 3164 | | |
3159 | 3165 | | |
| |||
3264 | 3270 | | |
3265 | 3271 | | |
3266 | 3272 | | |
3267 | | - | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
3268 | 3276 | | |
3269 | 3277 | | |
3270 | 3278 | | |
| |||
3308 | 3316 | | |
3309 | 3317 | | |
3310 | 3318 | | |
3311 | | - | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
3312 | 3326 | | |
3313 | 3327 | | |
3314 | 3328 | | |
| |||
3321 | 3335 | | |
3322 | 3336 | | |
3323 | 3337 | | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
3324 | 3346 | | |
3325 | 3347 | | |
3326 | | - | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
3327 | 3356 | | |
3328 | 3357 | | |
3329 | 3358 | | |
| |||
7430 | 7459 | | |
7431 | 7460 | | |
7432 | 7461 | | |
7433 | | - | |
| 7462 | + | |
7434 | 7463 | | |
7435 | 7464 | | |
7436 | 7465 | | |
| |||
7472 | 7501 | | |
7473 | 7502 | | |
7474 | 7503 | | |
7475 | | - | |
| 7504 | + | |
| 7505 | + | |
| 7506 | + | |
7476 | 7507 | | |
7477 | 7508 | | |
7478 | 7509 | | |
| |||
7491 | 7522 | | |
7492 | 7523 | | |
7493 | 7524 | | |
7494 | | - | |
| 7525 | + | |
| 7526 | + | |
| 7527 | + | |
| 7528 | + | |
| 7529 | + | |
| 7530 | + | |
| 7531 | + | |
7495 | 7532 | | |
7496 | 7533 | | |
7497 | 7534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| 132 | + | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| 140 | + | |
| 141 | + | |
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
| |||
188 | 194 | | |
189 | 195 | | |
190 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
191 | 274 | | |
192 | 275 | | |
193 | 276 | | |
| |||
328 | 411 | | |
329 | 412 | | |
330 | 413 | | |
| 414 | + | |
| 415 | + | |
331 | 416 | | |
332 | 417 | | |
333 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
93 | 103 | | |
94 | 104 | | |
95 | 105 | | |
96 | | - | |
| 106 | + | |
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
| |||
104 | 114 | | |
105 | 115 | | |
106 | 116 | | |
107 | | - | |
| 117 | + | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
| |||
151 | 161 | | |
152 | 162 | | |
153 | 163 | | |
154 | | - | |
155 | | - | |
| 164 | + | |
| 165 | + | |
156 | 166 | | |
157 | 167 | | |
158 | 168 | | |
| |||
205 | 215 | | |
206 | 216 | | |
207 | 217 | | |
| 218 | + | |
| 219 | + | |
208 | 220 | | |
209 | 221 | | |
210 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2073 | 2073 | | |
2074 | 2074 | | |
2075 | 2075 | | |
| 2076 | + | |
2076 | 2077 | | |
2077 | 2078 | | |
2078 | 2079 | | |
2079 | 2080 | | |
| 2081 | + | |
2080 | 2082 | | |
2081 | 2083 | | |
2082 | 2084 | | |
| |||
2249 | 2251 | | |
2250 | 2252 | | |
2251 | 2253 | | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
2252 | 2284 | | |
2253 | 2285 | | |
2254 | 2286 | | |
| |||
0 commit comments