fix(integrations): Read dataset-specific query params in explore unfurls#113304
Merged
DominikB2014 merged 6 commits intomasterfrom Apr 17, 2026
Merged
Conversation
Logs URLs use `logsQuery` and `logsSortBys` for their query and sort parameters, but the unfurl code only read the generic `query` and `aggregateSort` keys. Map the correct URL param key based on the detected dataset so logs unfurls include the user's filters. Fixes DAIN-1553 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33b09ef. Configure here.
Merge ExploreDatasetDefaults into a single ExploreDatasetConfig that includes query_key, sort_key, title_prefix, and default_y_axis. This makes dataset-specific URL param mappings data-driven instead of inline conditionals. Also fix sort_key for logs to use the aggregate sort param (logsAggregateSortBys) since unfurls render charts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace full-flow unfurl test with focused unit tests for the arg mapper. Covers logs and spans query/sort param mapping without needing to mock the API client or chart generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use match_link instead of calling map_explore_query_args directly, matching the pattern used by existing unfurl tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The frontend writes logsSortBys to most shared logs URLs (via utils.tsx), not logsAggregateSortBys. Using the aggregate key meant sorting was silently ignored for the common case. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
edwardgou-sentry
approved these changes
Apr 17, 2026
Add the standard assertion guard for match_link's nullable return type to fix mypy index error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Logs URLs use
logsQueryandlogsAggregateSortBysfor their query and sortparameters, but the Slack unfurl code only read the generic
queryandaggregateSortkeys. This meant logs unfurls never included the user'ssearch filters.
Consolidates the per-dataset defaults (
ExploreDatasetDefaults) into asingle
ExploreDatasetConfigthat also carriesquery_keyandsort_key,so the param mapping is data-driven instead of inline conditionals. Spans
and metrics are unaffected — spans already used
query/aggregateSort,and metrics extract both from the
metricJSON param.Fixes DAIN-1553