Repository navigation
fix(dashboard): Send the detail version in a custom header - #2687
Merged
Merged
Conversation
In production the detail route never returned 304. Browser spans show 304s, but every server span was a 200 that built the full report, so the Vercel CDN answered ETag / If-None-Match itself after the function ran. Carry the version token in x-junior-detail-version in both directions so the route can compare it before it builds the report. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 4, 2026
BYK
enabled auto-merge (squash)
November 4, 2026 20:54
Contributor
|
7 screenshot changes — 7 changed · 0 added · 0 removed Review screenshots in Frameshift |
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.
Follow-up to #2655. The version-gated 304 never fires in production.
Evidence (Sentry project
junior, http.serverGET /api/conversations/<id>detail reads):sentry-cli-local).http.clientspans for the same URLs do show 304s: 614 of ~1,580 between 17:00 and 20:15Z. Their p50 was ~500ms, slower than the 200s (~340ms).cab9c71d57e8180d) ran about once per detail read.So the function builds the full report on every poll. Then something in front of it, most likely the Vercel CDN, answers
ETag/If-None-Matchitself. That is an inference: the CDN behavior is not confirmed from Vercel docs. Either way, the route never sees a validator that matches.This change sends the token in
x-junior-detail-version, both on the response and on the next poll. The route compares that header before it builds the report. Mock reporting uses the same header. The token is unchanged except for theW/"…"wrapper, which no longer applies.To verify after deploy, server-side
http.response.status_code:304should appear on detail reads, and usage query spans per detail read should drop below 1.via @BYK.
--
View Session in Sentry