Skip to content

feat(traces): add 'Open in Logs' link to Logs view#110311

Merged
JoshuaKGoldberg merged 2 commits intomasterfrom
trace-logs-to-logs-link
Mar 11, 2026
Merged

feat(traces): add 'Open in Logs' link to Logs view#110311
JoshuaKGoldberg merged 2 commits intomasterfrom
trace-logs-to-logs-link

Conversation

@JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Mar 10, 2026

Adds a link button to the top-right of Explore > Traces > (trace) > Logs that links to the equivalent query in Explore > Logs.

Screenshot of a table of logs for a trace, with a 'View in Logs' link in the top-right

Fixes LOGS-132

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 10, 2026
@JoshuaKGoldberg JoshuaKGoldberg changed the title feat(traces): add 'View in Logs' link to Logs view feat(traces): add 'Open in Logs' link to Logs view Mar 10, 2026
@JoshuaKGoldberg JoshuaKGoldberg force-pushed the trace-logs-to-logs-link branch from 89b6219 to 90e3703 Compare March 10, 2026 16:49
organization,
selection,
query: traceId ? `trace:${traceId}` : undefined,
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Question] I got these added lines from asking Cursor "I need to open the current sentry.io trace in /explore/logs. How do i construct that link?". Is this the right way to do that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, typically there are functions that we'll use to create links as theres some repetitiveness to it. Everything here looks fine.

@JoshuaKGoldberg JoshuaKGoldberg force-pushed the trace-logs-to-logs-link branch from 90e3703 to 021905f Compare March 10, 2026 16:55
@linear-code
Copy link

linear-code bot commented Mar 10, 2026

@JoshuaKGoldberg JoshuaKGoldberg force-pushed the trace-logs-to-logs-link branch from 021905f to 9035db3 Compare March 10, 2026 18:19
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review March 10, 2026 18:28
@JoshuaKGoldberg JoshuaKGoldberg requested a review from a team as a code owner March 10, 2026 18:28
Copy link
Contributor

@nsdeschenes nsdeschenes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock, everything is fine here as is. Just need that tidy up moving over to a Flex component.

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

onSearch={query => setLogsQuery(query)}
/>
<LinkButton to={logsUrl}>{t('Open in Logs')}</LinkButton>
</Flex>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Search bar won't stretch to fill available width

Medium Severity

The SearchQueryBuilder inside the Flex container has no flex: 1 or equivalent, so it won't grow to fill the available row width. The existing analogous pattern in ourlogsDrawer.tsx wraps the search builder in <Flex flex="1"> to ensure it stretches. Without this, the search bar will render at its intrinsic width and the LinkButton will sit immediately next to it, leaving empty space on the right — a visible layout regression.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot of the search bar with proper width

Tim Robinson "are you sure about that" animated meme

@JoshuaKGoldberg JoshuaKGoldberg merged commit e5b9cc3 into master Mar 11, 2026
60 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the trace-logs-to-logs-link branch March 11, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants