Skip to content

feat(sentry): Show Explore chart cards with the viewer's own query - #3408

Merged
BYK merged 6 commits into
mainfrom
feat/sentry-explore-charts
Nov 14, 2026
Merged

BYK merged 6 commits into
mainfrom
feat/sentry-explore-charts

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

People share Sentry Explore links in threads to show a trend, such as a latency spike after a deploy. Today such a link shows as a plain URL, so readers must open Sentry to see what it shows. This PR makes links to Explore traces, logs, and metrics resolve to chart cards. It follows the issue cards (#3367, #3373) as part of the work to give Sentry links cards.

chart object type. A new native type (label "Chart", icon "graph"). Its facts are a display (line, bar, or area), the y-axis, the range, and 1 to 5 series of 2 to 120 points. Slack cards and the model's text show the range as a field. On the dashboard, the range is the chart caption.

Dashboard chart. The issue trend Sparkline now draws one or more series as lines, areas, or stacked bars. A legend names the series when there is more than one. The issue trend looks the same as before. The card meta line drops a label that repeats the type.

Access and data. A chart query covers the projects that its reader may see. Junior's org read token could see more than the viewer can, so the viewer's own Sentry token runs the query:

  • canView runs the events-timeseries query through viewerEgress.
  • The result is cached per viewer and URL for one minute. resolve builds the card from that entry.
  • Junior's org read token only finds the org's region host. It reads no chart data.
  • A viewer with no Sentry connection, or a Sentry 400, 401, 403, or 404, gets no card.
  • Points are downsampled and rounded to three significant digits, so five series fit the 4 KiB facts limit.

The viewerEgress doc now covers data that depends on who reads it.

@sentry/api. Sentry API calls for link cards use @sentry/api, pinned at 2.3.0, instead of hand-built requests. This covers the region lookup, the issue card reads, and the chart query. Each call goes through one Junior egress, so the host picks the token. Only the root client is used. It keeps no response cache, so one viewer's data never serves another. @sentry/[email protected] is the only new minimumReleaseAgeExclude entry, because Sentry publishes it. Its dependencies p-limit 7.3.3 and http-cache-semantics 4.2.0 pass the release age policy.

Nothing breaks. Issue cards keep their behavior. No new OAuth scopes, credential paths, or migrations.

Screenshots

Desktop at 1440, rendered from the dashboard mock.

Dark Light
Chart card Chart card, dark Chart card, light
Hover card Hover card, dark Hover card, light

via @BYK.

--

View Session [Sentry]

sentry-junior Bot and others added 3 commits November 13, 2026 23:11
Add a chart object type, drawn by the dashboard Sparkline as line, bar,
or area series with a legend. Sentry Explore traces, logs, and metrics
links resolve to chart cards. The viewer's own Sentry token runs the
events-timeseries query in canView, cached per viewer and URL for a
minute, and resolve draws the card from that entry.

Sentry API calls for link cards now use @sentry/api 2.3.0, exempt from
the release age delay because Sentry publishes it.

Co-Authored-By: BYK <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from BYK November 13, 2026 23:46
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 14, 2026 12:41am UTC

Request Review

@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 13, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

…harts

# Conflicts:
#	packages/junior-dashboard/src/client/conversations/ObjectCard.tsx
#	packages/junior-dashboard/src/mock-reporting/objects.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

51 screenshot changes — 47 changed · 4 added · 0 removed

Review screenshots in Frameshift

Automation Skill Editor · Desktop
Automation Skill Editor · Desktop
Changed
Automations Runs Filters · Desktop
Automations Runs Filters · Desktop
Changed
Conversation Attached Linked Work · Desktop
Conversation Attached Linked Work · Desktop
Changed
Conversation Attached Linked Work Denied · Desktop
Conversation Attached Linked Work Denied · Desktop
Changed
Conversation Attached Linked Work Denied Light · Desktop
Conversation Attached Linked Work Denied Light · Desktop
Changed
Conversation Attached Linked Work Light · Desktop
Conversation Attached Linked Work Light · Desktop
Changed
Show 12 more changed screenshots
Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Attachment Zoom · Desktop
Conversation Attachment Zoom · Desktop
Changed
Conversation Captured Memories Popover · Desktop
Conversation Captured Memories Popover · Desktop
Changed
Conversation Child Agents · Desktop
Conversation Child Agents · Desktop
Changed
Conversation Details Watched Linked Work · Desktop
Conversation Details Watched Linked Work · Desktop
Changed
Conversation Event Log Virtual · Desktop
Conversation Event Log Virtual · Desktop
Changed
Conversation Google Calendar Link · Desktop
Conversation Google Calendar Link · Desktop
Changed
Conversation Google Calendar Link Light · Desktop
Conversation Google Calendar Link Light · Desktop
Changed
Conversation Google Document Link · Desktop
Conversation Google Document Link · Desktop
Changed
Conversation Google Document Link Light · Desktop
Conversation Google Document Link Light · Desktop
Changed

29 more changed screenshots in Frameshift.

A valid statsPeriod wins over stale start and end, the bounds count only
as a pair, and Sentry's zone-less bounds are UTC. A bucket with no
samples is drawn across from its neighbors instead of as a zero.
@BYK
BYK enabled auto-merge (squash) November 14, 2026 00:29
…harts

# Conflicts:
#	packages/junior-dashboard/src/mock-reporting/objects.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 85cfdfd. Configure here.

@BYK
BYK merged commit 93753ad into main Nov 14, 2026
48 checks passed
@BYK
BYK deleted the feat/sentry-explore-charts branch November 14, 2026 00:49
BYK pushed a commit that referenced this pull request Nov 14, 2026
…3419)

**Problem:** a grouped Explore chart with more than one aggregate named
each series only by its group. `p95(span.duration)` and
`count(span.duration)` for `db` both showed as "db", so the legend could
not tell them apart. Introduced in #3408 ([review
thread](#3408 (comment))).

**Fix:** each label names the group and the aggregate, such as `db ·
p95(span.duration)`. The "Other" group gets the same treatment. A chart
with one aggregate still uses the group as its label.

| | Light | Dark |
| --- | --- | --- |
| Before | ![Legend before,
light](https://junior-prod.sentry.dev/public/artifacts/7bbdecc1-b00f-4e19-b9c7-be2cd4438f89.png)
| ![Legend before,
dark](https://junior-prod.sentry.dev/public/artifacts/774afa0d-0f7e-4a44-93ce-e134b9aa39b7.png)
|
| After | ![Legend after,
light](https://junior-prod.sentry.dev/public/artifacts/4bce8da2-24a6-4568-afd7-709a1d924999.png)
| ![Legend after,
dark](https://junior-prod.sentry.dev/public/artifacts/1000fe2c-509c-45a4-b54f-6c6e3ed987eb.png)
|

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3Ab784a61e6351b98fecdafda6e0e72301 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Ab784a61e6351b98fecdafda6e0e72301)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab784a61e6351b98fecdafda6e0e72301/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
BYK added a commit that referenced this pull request Nov 14, 2026
Today a Sentry trace link in a reply is a bare URL. A reader has to open
Sentry to learn what the trace did, how long it took, and whether it
failed. This PR shows that at a glance, as a card with the root span,
the totals, and a small waterfall of the first top-level spans.

A trace can cross projects that the reader may not see. So the viewer's
own Sentry account reads it, and Sentry decides what each viewer sees.

- **New `trace` object type:** labelled "Trace" with the `rows` icon.
Its facts are the root op and name, the duration, the span, error and
performance issue counts, up to 5 projects, and up to 12 top-level
spans. Spans are dropped from the end until the facts fit in 4 KiB.
- **Dashboard waterfall:** `TraceWaterfall` draws the spans on one time
axis. A span with an error or a performance issue is red.
- **Viewer read:** `canView` reads `trace-meta` and `trace` with the
viewer's token through `viewerEgress`. The result is cached per viewer
and trace for 1 minute, and `resolve` reuses that entry. Junior's org
token only finds the org's region host. A viewer who has not connected
Sentry, or who can see none of the trace's spans, gets no card. This
adds no scopes or credential paths.
- **URLs:** `explore/traces/trace/<id>/` and `performance/trace/<id>/`,
on `sentry.io/organizations/<org>/` and `<org>.sentry.io`. An optional
`timestamp` narrows the read. Without it, the read looks back 14 days.

Builds on #3408 (merged).

Screenshots are from the dashboard mock at 1440.

| | Light | Dark |
| --- | --- | --- |
| Card | ![Trace card,
light](https://junior-prod.sentry.dev/public/artifacts/81db8ffb-cfb4-45fb-b3bd-721c514e0630.png)
| ![Trace card,
dark](https://junior-prod.sentry.dev/public/artifacts/8e963024-d95b-4dc5-b413-1f8149d06e78.png)
|
| Hover card | ![Trace hover card,
light](https://junior-prod.sentry.dev/public/artifacts/62a63ddc-6433-42fb-825c-c571cbb4f85c.png)
| ![Trace hover card,
dark](https://junior-prod.sentry.dev/public/artifacts/b79ee41d-f049-462d-a3c1-7b40f3e1ced6.png)
|

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3Ab784a61e6351b98fecdafda6e0e72301 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Ab784a61e6351b98fecdafda6e0e72301)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab784a61e6351b98fecdafda6e0e72301/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 85cfdfd7 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant