Skip to content

fix(slack): Prefer aggregateField over visualize in explore unfurl#114188

Merged
DominikB2014 merged 4 commits intomasterfrom
dominik/fix-slack-explore-unfurl-aggregate-field-precedence
Apr 28, 2026
Merged

fix(slack): Prefer aggregateField over visualize in explore unfurl#114188
DominikB2014 merged 4 commits intomasterfrom
dominik/fix-slack-explore-unfurl-aggregate-field-precedence

Conversation

@DominikB2014
Copy link
Copy Markdown
Contributor

@DominikB2014 DominikB2014 commented Apr 28, 2026

The explore UI checks against the aggregateField param before the visualize param, updates the chart url unfurl to do the same

When an Explore URL contains both the canonical aggregateField param and
the legacy visualize param (e.g. links produced by the dashboards "Open
in Explore" flow), the unfurl arg mapper preferred visualize and
discarded aggregateField. This caused the events-timeseries request to
use the wrong yAxis and to drop the groupBy entirely.

Flip the precedence to match the frontend's
getSpansAggregateFieldsFromLocation / getLogsAggregateFieldsFromLocation:
read aggregateField first, falling back to visualize only when
aggregateField is absent. Metrics is unaffected — it parses its own
metric JSON param earlier and never reaches this branch.

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 28, 2026
DominikB2014 and others added 2 commits April 28, 2026 12:15
The comment described pre-aggregateField behavior that no longer matches
the code below it.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@DominikB2014 DominikB2014 requested a review from a team April 28, 2026 16:23
@DominikB2014 DominikB2014 marked this pull request as ready for review April 28, 2026 16:41
@DominikB2014 DominikB2014 requested review from a team as code owners April 28, 2026 16:41
@DominikB2014 DominikB2014 merged commit a604b09 into master Apr 28, 2026
56 checks passed
@DominikB2014 DominikB2014 deleted the dominik/fix-slack-explore-unfurl-aggregate-field-precedence branch April 28, 2026 17:19
DominikB2014 added a commit that referenced this pull request Apr 29, 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>
cleptric pushed a commit that referenced this pull request May 5, 2026
…114188)

The explore UI checks against the aggregateField param before the
visualize param, updates the chart url unfurl to do the same

---------

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