Repository navigation
feat(objects): Draw a trend sparkline on Ticket cards, starting with Sentry issues - #3373
Merged
Merged
Conversation
…Sentry issues Ticket facts can carry a short trend: a label and 2 to 60 nonnegative points, oldest first. The full card draws it as a sparkline. The Sentry issue card sends events per hour for the last day from the issue's 24h stats. Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: BYK <[email protected]>
BYK
approved these changes
Nov 13, 2026
BYK
added a commit
that referenced
this pull request
Nov 13, 2026
…nks (#3397) The Sentry issue link expectation from #3367 and #3373 is out of date. It looks for a chip named "JUNIOR-3ZK · Unresolved". Since #3381, a bare link in a sentence renders as a plain titled link, "TypeError: cart.total is undefined (JUNIOR-3ZK)". The PRs landed close together, so the expectation still describes the old chip. The new rendering is intended, so only the expectation changes: a titled link, with the issue state shown in the hover card. No app code changes. <!-- 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]>
BYK
added a commit
that referenced
this pull request
Nov 14, 2026
…3408) 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 |  |  | | Hover card |  |  | <!-- 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]>
23 tasks done
This branch was successfully deployed
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.
A Sentry issue card now draws its events per hour for the last day as a sparkline.
Stacked on #3367. After #3367 merges, this moves onto
main.Contract: Ticket (
task) facts take an optionaltrend: alabeland 2 to 60 nonnegativepoints, oldest first. The full card draws the shape under the summary. It has no exact values or axes, and it doesn't use the image proxy: the series is plain numbers in the facts, well under the 4 KiB limit. A sharedSparklineincomponents/charts/draws it as inline SVG in the accent color.Sentry: the issue details API already returns
stats["24h"], which holds hourly[timestamp, count]pairs. The card maps them topoints. It sends no trend when there are fewer than two points or a negative count, so a bad series never drops the whole card.Tests
tests/integration/api/sentry-issue-links.test.ts: the allowed viewer's card has the trend. Without the facts schema change, the cards are rejected and the tests fail.via @BYK.
--
View Session [Sentry]