Skip to content

feat(attributes): Add page.server_rendering.age attribute - #799

Merged
s1gr1d merged 2 commits into
mainfrom
sig/page-render-age
Nov 16, 2026
Merged

s1gr1d merged 2 commits into
mainfrom
sig/page-render-age

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Description

Adds page.server_rendering.age for pageload spans. It's the time in seconds from the start of the server render of the reused part of the page to the start of the pageload span. Integer, clamped to 0, like cache.item_age.

Mentioned here: getsentry/sentry#130769 (comment)

Why "age": cache.item_age and the HTTP Age header (RFC 9111) use the word for the same kind of value, in seconds.

Why an age and not a timestamp: Sentry can aggregate and filter an age, for example p75 per route or "older than one day". The age mixes the server clock and the browser clock, but an error of a few minutes doesn't matter in a 1.5 day window.

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for apply_scrubbing (i.e. manual or auto. Use never only for values that should never be scrubbed such as IDs)

If an attribute was deprecated:

A pageload of a reused page links the render with a cache_origin link, but the link has
no timestamp. Sentry finds a trace only within about 1.5 days of the time it gets, so it
cannot open renders that are older.

The age gives the time of the render: pageload start minus age. It is an integer in
seconds and clamped to 0, as cache.item_age.
@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
sentry-conventions Ready Ready Preview Nov 13, 2026 2:32pm UTC

Request Review

@github-actions

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add page.server_rendering.age attribute by s1gr1d in #799
  • Add schema for gen_ai.tool.call.result by alexander-alderman-webb in #794
  • Add schema for gen_ai.system_instructions by alexander-alderman-webb in #791
  • Add TypeScript type generation from OpenAPI schemas by alexander-alderman-webb in #771
  • Add Python type generation from OpenAPI schemas by alexander-alderman-webb in #769
  • Add schema for gen_ai.tool.definitions by alexander-alderman-webb in #767

Other

  • (model) Add Elixir runtime metrics by solnic in #768

Bug Fixes 🐛

  • (attributes) Describe pageload links for cache_origin and server_request by s1gr1d in #789

Internal Changes 🔧

  • (attributes) Prevent splicing system messages out of gen_ai.input.messages by alexander-alderman-webb in #790
  • (codeowners) Move gen_ai attribute ownership to agent-tracing by shellmayr in #792

🤖 This preview updates automatically when you update the PR.

@s1gr1d
s1gr1d merged commit b723b88 into main Nov 16, 2026
17 of 18 checks passed
@s1gr1d
s1gr1d deleted the sig/page-render-age branch November 16, 2026 10:38
s1gr1d added a commit to getsentry/sentry-javascript that referenced this pull request Nov 16, 2026
…26397)

## What

Next.js now writes a `sentry-render-start` meta tag (whole UNIX seconds)
next to `sentry-cache-origin`. The browser uses it to set
`page.server_rendering.age` on the pageload span, so the UI can show how
old the cached HTML was. The browser side is in `@sentry/core`, so
SvelteKit and Nuxt only need to write the tag. They follow in stacked
PRs.

## Why

The `cache_origin` link tells you which render produced a cached page,
but not how old that page is. That linked span is often not sampled or
already gone, so the browser needs the start time itself.

The tag holds the start of the linked render span. Without a recording
span, it holds the current time, which is the render start, because
Next.js computes the meta tags at the start of `prerenderToStream`. The
attribute comes from getsentry/sentry-conventions#799, which is not
merged yet, so the name is a local constant with a TODO.

A `Server-Timing` header (#26107) does not replace the tag:
shared-cacheable responses and Vercel do not send it, and it cannot hold
the render time of a cached shell.
s1gr1d added a commit to getsentry/sentry that referenced this pull request Nov 19, 2026
"Open trace" in the Server rendering section of the pageload drawer now
opens the trace of a reused render, also when the render is more than
1.5 days older than the pageload. Before, the link sent the pageload
start as `timestamp`. The trace query searches only 1.5 days around that
time, so the link opened an empty trace for old pre-rendered pages.

The SDKs now set `page.server_rendering.age` on the pageload span: the
seconds from the start of the reused render to the start of the pageload
(getsentry/sentry-conventions#799, getsentry/sentry-javascript#26397).
The link sends `pageload start − age`, which is the start of the linked
render span. If the age is missing (older SDKs) or negative, the link
sends the pageload start, as before. The request render
(`server_request` link) does not change.

When the render start is older than the span retention, the section
shows "Past N-day retention" instead of a link. This uses the same check
as the Cache Lifecycle section.

This branch was successfully deployed

1 active deployment
Preview — c919e91c Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants