Commit 6bd1582
fix(explore): Pass sort param for group-by explore Slack unfurls (#112704)
When an Explore link with `groupBy` is unfurled in Slack, the unfurl
sets
`topEvents=5` but omits the `sort` parameter. Without it, the timeseries
endpoint returns whichever groups it defaults to rather than the actual
top
groups matching what Explore shows (e.g., "mark" and "paint" appearing
instead of the real top groups).
Two changes:
- `map_explore_query_args` now copies the `aggregateSort` URL param
(Explore's name) as `sort` (the API param name)
- `_unfurl_explore` defaults to `-{yAxis}` (descending by the charted
aggregate) when no explicit sort is present, matching the frontend's
`defaultAggregateSortBys` behavior
Fixes DAIN-1490
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent b4bb9a8 commit 6bd1582
File tree
2 files changed
+41
-0
lines changed- src/sentry/integrations/slack/unfurl
- tests/sentry/integrations/slack
2 files changed
+41
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| |||
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
234 | 244 | | |
235 | 245 | | |
236 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1578 | 1578 | | |
1579 | 1579 | | |
1580 | 1580 | | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
1581 | 1612 | | |
1582 | 1613 | | |
1583 | 1614 | | |
| |||
0 commit comments