Skip to content

fix(slack): Drop stale aggregateSort in explore unfurl when field is unknown#114334

Merged
DominikB2014 merged 3 commits intomasterfrom
dominikb2014/fix/explore-unfurl-stale-aggregate-sort
Apr 29, 2026
Merged

fix(slack): Drop stale aggregateSort in explore unfurl when field is unknown#114334
DominikB2014 merged 3 commits intomasterfrom
dominikb2014/fix/explore-unfurl-stale-aggregate-sort

Conversation

@DominikB2014
Copy link
Copy Markdown
Contributor

@DominikB2014 DominikB2014 commented Apr 29, 2026

Fix Slack unfurls of Explore traces URLs that carry an aggregateSort referencing a function that isn't in the active aggregateField yAxes/groupBys (a stale sort left over from an earlier visualize selection).

Mirror the frontend's validateAggregateSort

Refs #114188

…unknown

When an Explore traces URL contains an aggregateSort that references a
function not in the active aggregateField yAxes/groupBys (a stale sort
left over from a different visualize), the events-timeseries call
sorts top events by an aggregate it never selected and returns no
data, so the Slack unfurl renders no chart.

Mirror the frontend's validateAggregateSort: validate every entry of
the URL sort against the parsed yAxes and groupBys, and discard the
sort when any entry is unknown so the unfurl falls back to the
default `-yAxes[0]` top-events sort.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 29, 2026
DominikB2014 and others added 2 commits April 29, 2026 14:12
Co-Authored-By: Claude <noreply@anthropic.com>
Logs use `logsSortBys` to sort the log table on columns like
`timestamp`, not aggregate functions. The new validation only
applies to `aggregateSort` (spans, metrics).

Co-Authored-By: Claude <noreply@anthropic.com>
@DominikB2014 DominikB2014 marked this pull request as ready for review April 29, 2026 18:39
@DominikB2014 DominikB2014 requested review from a team as code owners April 29, 2026 18:39
@DominikB2014 DominikB2014 requested a review from a team April 29, 2026 18:42
@DominikB2014 DominikB2014 merged commit 36afaab into master Apr 29, 2026
61 checks passed
@DominikB2014 DominikB2014 deleted the dominikb2014/fix/explore-unfurl-stale-aggregate-sort branch April 29, 2026 19:58
cleptric pushed a commit that referenced this pull request May 5, 2026
…unknown (#114334)

Fix Slack unfurls of Explore traces URLs that carry an `aggregateSort`
referencing a function that isn't in the active `aggregateField`
yAxes/groupBys (a stale sort left over from an earlier `visualize`
selection).

Mirror the frontend's validateAggregateSort

Refs #114188

---------

Co-authored-by: Claude <noreply@anthropic.com>
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