From 677780482746365e1ae5e85fdc8ac620f5f6cc0e Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 21 Oct 2026 14:29:36 +0200 Subject: [PATCH 1/7] feat(attributes): Add document.static_html attribute The Sentry JavaScript SDK marks a pageload whose HTML the server rendered before the request, such as a Next.js ISR page or a Partial Prerendering shell. That pageload has no server span for its own request, which looks like missing server instrumentation. --- .../sentry-conventions/src/attributes.ts | 47 +++++++++++++++++++ javascript/sentry-conventions/src/search.ts | 13 +++++ .../document/document__static_html.json | 31 ++++++++++++ python/src/sentry_conventions/attributes.py | 35 ++++++++++++++ 4 files changed, 126 insertions(+) create mode 100644 model/attributes/document/document__static_html.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index e4a8faaf..bdf1c7cc 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -6794,6 +6794,32 @@ export const DJANGO_MIDDLEWARE_NAME = 'django.middleware_name'; */ export type DJANGO_MIDDLEWARE_NAME_TYPE = string; +// Path: model/attributes/document/document__static_html.json + +/** + * Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor. `document.static_html` + * + * Attribute Value Type: `string` {@link DOCUMENT_STATIC_HTML_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * Well-defined Values: + * - `full` - The server rendered the whole document before the request, for example at build time or during an earlier request (Next.js ISR, Nuxt `swr` route rules). + * - `partial` - The server rendered a static part of the document before the request, and the other parts for this request in the same response (Next.js Partial Prerendering). + * + * @example "full" + * @example "partial" + */ +export const DOCUMENT_STATIC_HTML = 'document.static_html'; + +/** + * Type for {@link DOCUMENT_STATIC_HTML} document.static_html + */ +export type DOCUMENT_STATIC_HTML_TYPE = string; + // Path: model/attributes/effectiveConnectionType.json /** @@ -20924,6 +20950,7 @@ export const ATTRIBUTE_TYPE: Record = { dist: 'string', 'django.function_name': 'string', 'django.middleware_name': 'string', + 'document.static_html': 'string', effectiveConnectionType: 'string', environment: 'string', 'error.type': 'string', @@ -21841,6 +21868,7 @@ export type AttributeName = | typeof DIST | typeof DJANGO_FUNCTION_NAME | typeof DJANGO_MIDDLEWARE_NAME + | typeof DOCUMENT_STATIC_HTML | typeof EFFECTIVECONNECTIONTYPE | typeof ENVIRONMENT | typeof ERROR_TYPE @@ -27230,6 +27258,24 @@ export const ATTRIBUTE_METADATA: Record = { aliases: ['middleware.name'], changelog: [{ version: '0.19.0', prs: [520], description: 'Added django.middleware_name attribute' }], }, + 'document.static_html': { + brief: + "Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor.", + type: 'string', + keys: ['document.static_html'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'full', + examples: ['full', 'partial'], + changelog: [{ version: 'next', description: 'Added document.static_html attribute' }], + additionalContext: [ + 'Not set when the server rendered the whole document for this request, or when the SDK cannot tell.', + "Describes the server render only. A response that a CDN or the browser cache reused does not count. The browser's own prerendering (Speculation Rules) is described by `browser.navigation.type`.", + ], + }, effectiveConnectionType: { brief: 'Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).', type: 'string', @@ -37898,6 +37944,7 @@ export type Attributes = { [DIST]?: DIST_TYPE; [DJANGO_FUNCTION_NAME]?: DJANGO_FUNCTION_NAME_TYPE; [DJANGO_MIDDLEWARE_NAME]?: DJANGO_MIDDLEWARE_NAME_TYPE; + [DOCUMENT_STATIC_HTML]?: DOCUMENT_STATIC_HTML_TYPE; [EFFECTIVECONNECTIONTYPE]?: EFFECTIVECONNECTIONTYPE_TYPE; [ENVIRONMENT]?: ENVIRONMENT_TYPE; [ERROR_TYPE]?: ERROR_TYPE_TYPE; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 8348fdd4..523cc1c9 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -1739,6 +1739,11 @@ export const SEARCH_DJANGO__FUNCTION_NAME = 'django.function_name'; */ export const SEARCH_DJANGO__MIDDLEWARE_NAME = 'django.middleware_name'; +/** + * Search name for {@link attributes.DOCUMENT_STATIC_HTML}. `document.static_html` + */ +export const SEARCH_DOCUMENT__STATIC_HTML = 'document.static_html'; + /** * Search name for {@link attributes.EFFECTIVECONNECTIONTYPE}. `effectiveConnectionType` * @@ -5602,6 +5607,7 @@ export type AttributeSearchName = | typeof SEARCH_DIST | typeof SEARCH_DJANGO__FUNCTION_NAME | typeof SEARCH_DJANGO__MIDDLEWARE_NAME + | typeof SEARCH_DOCUMENT__STATIC_HTML | typeof SEARCH_EFFECTIVECONNECTIONTYPE | typeof SEARCH_ENVIRONMENT | typeof SEARCH_ERROR__TYPE @@ -8228,6 +8234,13 @@ export const ATTRIBUTE_SEARCH_METADATA: Record 'starlite.middleware_name', ], }, + 'document.static_html': { + canonicalName: 'document.static_html', + type: 'string', + brief: + "Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor.", + deprecationChain: ['document.static_html'], + }, effectiveConnectionType: { canonicalName: 'network.connection.effective_type', type: 'string', diff --git a/model/attributes/document/document__static_html.json b/model/attributes/document/document__static_html.json new file mode 100644 index 00000000..d41c49c9 --- /dev/null +++ b/model/attributes/document/document__static_html.json @@ -0,0 +1,31 @@ +{ + "key": "document.static_html", + "brief": "Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "additional_context": [ + "Not set when the server rendered the whole document for this request, or when the SDK cannot tell.", + "Describes the server render only. A response that a CDN or the browser cache reused does not count. The browser's own prerendering (Speculation Rules) is described by `browser.navigation.type`." + ], + "is_in_otel": false, + "visibility": "public", + "examples": ["full", "partial"], + "enum_values": [ + { + "value": "full", + "brief": "The server rendered the whole document before the request, for example at build time or during an earlier request (Next.js ISR, Nuxt `swr` route rules)." + }, + { + "value": "partial", + "brief": "The server rendered a static part of the document before the request, and the other parts for this request in the same response (Next.js Partial Prerendering)." + } + ], + "changelog": [ + { + "version": "next", + "description": "Added document.static_html attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index be5f40f8..2ac2601e 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -4276,6 +4276,21 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "AuthenticationMiddleware" """ + # Path: model/attributes/document/document__static_html.json + DOCUMENT_STATIC_HTML: Literal["document.static_html"] = "document.static_html" + """Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Well-defined Values: + - `full` - The server rendered the whole document before the request, for example at build time or during an earlier request (Next.js ISR, Nuxt `swr` route rules). + - `partial` - The server rendered a static part of the document before the request, and the other parts for this request in the same response (Next.js Partial Prerendering). + Example: "full" + Example: "partial" + """ + # Path: model/attributes/effectiveConnectionType.json EFFECTIVECONNECTIONTYPE: Literal["effectiveConnectionType"] = ( "effectiveConnectionType" @@ -17806,6 +17821,25 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "document.static_html": AttributeMetadata( + brief="Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor.", + type=AttributeType.STRING, + keys=("document.static_html",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="full", + examples=["full", "partial"], + changelog=[ + ChangelogEntry( + version="next", description="Added document.static_html attribute" + ), + ], + additional_context=[ + "Not set when the server rendered the whole document for this request, or when the SDK cannot tell.", + "Describes the server render only. A response that a CDN or the browser cache reused does not count. The browser's own prerendering (Speculation Rules) is described by `browser.navigation.type`.", + ], + ), "effectiveConnectionType": AttributeMetadata( brief="Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).", type=AttributeType.STRING, @@ -29871,6 +29905,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "dist": str, "django.function_name": str, "django.middleware_name": str, + "document.static_html": str, "effectiveConnectionType": str, "environment": str, "error.type": str, From 71c1a78e9b4d167211cdb9af5f5ee1e557f23860 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 21 Oct 2026 14:30:25 +0200 Subject: [PATCH 2/7] add PR number to changelog --- javascript/sentry-conventions/src/attributes.ts | 2 +- model/attributes/document/document__static_html.json | 1 + python/src/sentry_conventions/attributes.py | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index bdf1c7cc..4a98b524 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -27270,7 +27270,7 @@ export const ATTRIBUTE_METADATA: Record = { visibility: 'public', example: 'full', examples: ['full', 'partial'], - changelog: [{ version: 'next', description: 'Added document.static_html attribute' }], + changelog: [{ version: 'next', prs: [740], description: 'Added document.static_html attribute' }], additionalContext: [ 'Not set when the server rendered the whole document for this request, or when the SDK cannot tell.', "Describes the server render only. A response that a CDN or the browser cache reused does not count. The browser's own prerendering (Speculation Rules) is described by `browser.navigation.type`.", diff --git a/model/attributes/document/document__static_html.json b/model/attributes/document/document__static_html.json index d41c49c9..b4458cf2 100644 --- a/model/attributes/document/document__static_html.json +++ b/model/attributes/document/document__static_html.json @@ -25,6 +25,7 @@ "changelog": [ { "version": "next", + "prs": [740], "description": "Added document.static_html attribute" } ] diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 2ac2601e..34e21e29 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -17832,7 +17832,9 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): examples=["full", "partial"], changelog=[ ChangelogEntry( - version="next", description="Added document.static_html attribute" + version="next", + prs=[740], + description="Added document.static_html attribute", ), ], additional_context=[ From 80d2906faca4dc85be0a6d62287aa57f21869b5b Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 21 Oct 2026 15:22:52 +0200 Subject: [PATCH 3/7] Clarify the document.static_html brief and context --- javascript/sentry-conventions/src/attributes.ts | 9 +++++---- javascript/sentry-conventions/src/search.ts | 2 +- model/attributes/document/document__static_html.json | 7 ++++--- python/src/sentry_conventions/attributes.py | 9 +++++---- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 4a98b524..f1d1caf4 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -6797,7 +6797,7 @@ export type DJANGO_MIDDLEWARE_NAME_TYPE = string; // Path: model/attributes/document/document__static_html.json /** - * Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor. `document.static_html` + * Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly. `document.static_html` * * Attribute Value Type: `string` {@link DOCUMENT_STATIC_HTML_TYPE} * @@ -27260,7 +27260,7 @@ export const ATTRIBUTE_METADATA: Record = { }, 'document.static_html': { brief: - "Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor.", + "Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly.", type: 'string', keys: ['document.static_html'], applyScrubbing: { @@ -27272,8 +27272,9 @@ export const ATTRIBUTE_METADATA: Record = { examples: ['full', 'partial'], changelog: [{ version: 'next', prs: [740], description: 'Added document.static_html attribute' }], additionalContext: [ - 'Not set when the server rendered the whole document for this request, or when the SDK cannot tell.', - "Describes the server render only. A response that a CDN or the browser cache reused does not count. The browser's own prerendering (Speculation Rules) is described by `browser.navigation.type`.", + 'Not set when the server rendered the document for this request, or when the SDK does not know.', + 'The server spans that rendered this HTML are in an earlier trace, not in the trace of the pageload span.', + "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", ], }, effectiveConnectionType: { diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 523cc1c9..a6c61521 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -8238,7 +8238,7 @@ export const ATTRIBUTE_SEARCH_METADATA: Record canonicalName: 'document.static_html', type: 'string', brief: - "Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor.", + "Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly.", deprecationChain: ['document.static_html'], }, effectiveConnectionType: { diff --git a/model/attributes/document/document__static_html.json b/model/attributes/document/document__static_html.json index b4458cf2..80e13400 100644 --- a/model/attributes/document/document__static_html.json +++ b/model/attributes/document/document__static_html.json @@ -1,13 +1,14 @@ { "key": "document.static_html", - "brief": "Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor.", + "brief": "Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly.", "type": "string", "apply_scrubbing": { "key": "manual" }, "additional_context": [ - "Not set when the server rendered the whole document for this request, or when the SDK cannot tell.", - "Describes the server render only. A response that a CDN or the browser cache reused does not count. The browser's own prerendering (Speculation Rules) is described by `browser.navigation.type`." + "Not set when the server rendered the document for this request, or when the SDK does not know.", + "The server spans that rendered this HTML are in an earlier trace, not in the trace of the pageload span.", + "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`." ], "is_in_otel": false, "visibility": "public", diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 34e21e29..4902a53d 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -4278,7 +4278,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): # Path: model/attributes/document/document__static_html.json DOCUMENT_STATIC_HTML: Literal["document.static_html"] = "document.static_html" - """Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor. + """Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly. Type: str Apply Scrubbing: manual @@ -17822,7 +17822,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ], ), "document.static_html": AttributeMetadata( - brief="Set on a pageload span. Describes how much of the document's HTML the server rendered before the request, to serve the same HTML to every visitor.", + brief="Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly.", type=AttributeType.STRING, keys=("document.static_html",), apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), @@ -17838,8 +17838,9 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], additional_context=[ - "Not set when the server rendered the whole document for this request, or when the SDK cannot tell.", - "Describes the server render only. A response that a CDN or the browser cache reused does not count. The browser's own prerendering (Speculation Rules) is described by `browser.navigation.type`.", + "Not set when the server rendered the document for this request, or when the SDK does not know.", + "The server spans that rendered this HTML are in an earlier trace, not in the trace of the pageload span.", + "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", ], ), "effectiveConnectionType": AttributeMetadata( From f4eb4ddef55f1f20255c11eb26cc2d1b8d8fb8e6 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 21 Oct 2026 15:26:20 +0200 Subject: [PATCH 4/7] Restore the two-sentence document.static_html brief --- javascript/sentry-conventions/src/attributes.ts | 4 ++-- javascript/sentry-conventions/src/search.ts | 2 +- model/attributes/document/document__static_html.json | 2 +- python/src/sentry_conventions/attributes.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index f1d1caf4..135475d3 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -6797,7 +6797,7 @@ export type DJANGO_MIDDLEWARE_NAME_TYPE = string; // Path: model/attributes/document/document__static_html.json /** - * Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly. `document.static_html` + * Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then. `document.static_html` * * Attribute Value Type: `string` {@link DOCUMENT_STATIC_HTML_TYPE} * @@ -27260,7 +27260,7 @@ export const ATTRIBUTE_METADATA: Record = { }, 'document.static_html': { brief: - "Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly.", + "Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then.", type: 'string', keys: ['document.static_html'], applyScrubbing: { diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index a6c61521..3424b845 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -8238,7 +8238,7 @@ export const ATTRIBUTE_SEARCH_METADATA: Record canonicalName: 'document.static_html', type: 'string', brief: - "Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly.", + "Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then.", deprecationChain: ['document.static_html'], }, effectiveConnectionType: { diff --git a/model/attributes/document/document__static_html.json b/model/attributes/document/document__static_html.json index 80e13400..f2f4c537 100644 --- a/model/attributes/document/document__static_html.json +++ b/model/attributes/document/document__static_html.json @@ -1,6 +1,6 @@ { "key": "document.static_html", - "brief": "Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly.", + "brief": "Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then.", "type": "string", "apply_scrubbing": { "key": "manual" diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 4902a53d..5ae3f91a 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -4278,7 +4278,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): # Path: model/attributes/document/document__static_html.json DOCUMENT_STATIC_HTML: Literal["document.static_html"] = "document.static_html" - """Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly. + """Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then. Type: str Apply Scrubbing: manual @@ -17822,7 +17822,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ], ), "document.static_html": AttributeMetadata( - brief="Set on a pageload span when the server rendered the document's HTML before the request, either fully or partly.", + brief="Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then.", type=AttributeType.STRING, keys=("document.static_html",), apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), From ba009a4195a6504b976d37e6a035fa8596812536 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 21 Oct 2026 16:55:18 +0200 Subject: [PATCH 5/7] Describe document.static_html as reused HTML, not HTML rendered before the request The first visitor of a page that the server renders on demand gets HTML that was rendered during their own request. That HTML is still reused for later requests, so the attribute is set, but "before the request" and "earlier trace" were wrong for it. --- javascript/sentry-conventions/src/attributes.ts | 12 ++++++------ javascript/sentry-conventions/src/search.ts | 2 +- model/attributes/document/document__static_html.json | 10 +++++----- python/src/sentry_conventions/attributes.py | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 135475d3..f074ed82 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -6797,7 +6797,7 @@ export type DJANGO_MIDDLEWARE_NAME_TYPE = string; // Path: model/attributes/document/document__static_html.json /** - * Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then. `document.static_html` + * Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused. `document.static_html` * * Attribute Value Type: `string` {@link DOCUMENT_STATIC_HTML_TYPE} * @@ -6807,8 +6807,8 @@ export type DJANGO_MIDDLEWARE_NAME_TYPE = string; * Visibility: public * * Well-defined Values: - * - `full` - The server rendered the whole document before the request, for example at build time or during an earlier request (Next.js ISR, Nuxt `swr` route rules). - * - `partial` - The server rendered a static part of the document before the request, and the other parts for this request in the same response (Next.js Partial Prerendering). + * - `full` - The server reuses the whole document, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route. + * - `partial` - The server reuses a static part of the document, and renders the other parts for this request in the same response (Next.js Partial Prerendering). * * @example "full" * @example "partial" @@ -27260,7 +27260,7 @@ export const ATTRIBUTE_METADATA: Record = { }, 'document.static_html': { brief: - "Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then.", + "Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused.", type: 'string', keys: ['document.static_html'], applyScrubbing: { @@ -27272,8 +27272,8 @@ export const ATTRIBUTE_METADATA: Record = { examples: ['full', 'partial'], changelog: [{ version: 'next', prs: [740], description: 'Added document.static_html attribute' }], additionalContext: [ - 'Not set when the server rendered the document for this request, or when the SDK does not know.', - 'The server spans that rendered this HTML are in an earlier trace, not in the trace of the pageload span.', + 'Not set when the server rendered the document only for this request, or when the SDK does not know.', + 'The server spans that rendered this HTML are in a different trace, not in the trace of the pageload span.', "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", ], }, diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 3424b845..fbadc098 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -8238,7 +8238,7 @@ export const ATTRIBUTE_SEARCH_METADATA: Record canonicalName: 'document.static_html', type: 'string', brief: - "Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then.", + "Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused.", deprecationChain: ['document.static_html'], }, effectiveConnectionType: { diff --git a/model/attributes/document/document__static_html.json b/model/attributes/document/document__static_html.json index f2f4c537..aecf9d6a 100644 --- a/model/attributes/document/document__static_html.json +++ b/model/attributes/document/document__static_html.json @@ -1,13 +1,13 @@ { "key": "document.static_html", - "brief": "Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then.", + "brief": "Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused.", "type": "string", "apply_scrubbing": { "key": "manual" }, "additional_context": [ - "Not set when the server rendered the document for this request, or when the SDK does not know.", - "The server spans that rendered this HTML are in an earlier trace, not in the trace of the pageload span.", + "Not set when the server rendered the document only for this request, or when the SDK does not know.", + "The server spans that rendered this HTML are in a different trace, not in the trace of the pageload span.", "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`." ], "is_in_otel": false, @@ -16,11 +16,11 @@ "enum_values": [ { "value": "full", - "brief": "The server rendered the whole document before the request, for example at build time or during an earlier request (Next.js ISR, Nuxt `swr` route rules)." + "brief": "The server reuses the whole document, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route." }, { "value": "partial", - "brief": "The server rendered a static part of the document before the request, and the other parts for this request in the same response (Next.js Partial Prerendering)." + "brief": "The server reuses a static part of the document, and renders the other parts for this request in the same response (Next.js Partial Prerendering)." } ], "changelog": [ diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 5ae3f91a..48b49eba 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -4278,15 +4278,15 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): # Path: model/attributes/document/document__static_html.json DOCUMENT_STATIC_HTML: Literal["document.static_html"] = "document.static_html" - """Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then. + """Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused. Type: str Apply Scrubbing: manual Defined in OTEL: No Visibility: public Well-defined Values: - - `full` - The server rendered the whole document before the request, for example at build time or during an earlier request (Next.js ISR, Nuxt `swr` route rules). - - `partial` - The server rendered a static part of the document before the request, and the other parts for this request in the same response (Next.js Partial Prerendering). + - `full` - The server reuses the whole document, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route. + - `partial` - The server reuses a static part of the document, and renders the other parts for this request in the same response (Next.js Partial Prerendering). Example: "full" Example: "partial" """ @@ -17822,7 +17822,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ], ), "document.static_html": AttributeMetadata( - brief="Set on a pageload span when the server rendered the document's HTML before the request. The value says if the whole document or only a part of it was rendered then.", + brief="Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused.", type=AttributeType.STRING, keys=("document.static_html",), apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), @@ -17838,8 +17838,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], additional_context=[ - "Not set when the server rendered the document for this request, or when the SDK does not know.", - "The server spans that rendered this HTML are in an earlier trace, not in the trace of the pageload span.", + "Not set when the server rendered the document only for this request, or when the SDK does not know.", + "The server spans that rendered this HTML are in a different trace, not in the trace of the pageload span.", "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", ], ), From 8cbdf56af9570d74afbe56845640f5032f826cc9 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 21 Oct 2026 18:01:16 +0200 Subject: [PATCH 6/7] Rename to page.server_rendering with static, partially_static and dynamic "Partial" alone does not say what is partial, and a key named after static HTML cannot hold a value for pages that the server renders per request. page.server_rendering uses the Next.js terms for server rendering (static and dynamic), and the page namespace avoids keys that look like DOM properties. --- .../sentry-conventions/src/attributes.ts | 99 ++++++++++--------- javascript/sentry-conventions/src/search.ts | 26 ++--- .../document/document__static_html.json | 33 ------- .../page/page__server_rendering.json | 38 +++++++ python/src/sentry_conventions/attributes.py | 79 ++++++++------- 5 files changed, 143 insertions(+), 132 deletions(-) delete mode 100644 model/attributes/document/document__static_html.json create mode 100644 model/attributes/page/page__server_rendering.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index f074ed82..2a4b7ee6 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -6794,32 +6794,6 @@ export const DJANGO_MIDDLEWARE_NAME = 'django.middleware_name'; */ export type DJANGO_MIDDLEWARE_NAME_TYPE = string; -// Path: model/attributes/document/document__static_html.json - -/** - * Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused. `document.static_html` - * - * Attribute Value Type: `string` {@link DOCUMENT_STATIC_HTML_TYPE} - * - * Apply Scrubbing: manual - * - * Attribute defined in OTEL: No - * Visibility: public - * - * Well-defined Values: - * - `full` - The server reuses the whole document, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route. - * - `partial` - The server reuses a static part of the document, and renders the other parts for this request in the same response (Next.js Partial Prerendering). - * - * @example "full" - * @example "partial" - */ -export const DOCUMENT_STATIC_HTML = 'document.static_html'; - -/** - * Type for {@link DOCUMENT_STATIC_HTML} document.static_html - */ -export type DOCUMENT_STATIC_HTML_TYPE = string; - // Path: model/attributes/effectiveConnectionType.json /** @@ -14755,6 +14729,34 @@ export const OTEL_STATUS_DESCRIPTION = 'otel.status_description'; */ export type OTEL_STATUS_DESCRIPTION_TYPE = string; +// Path: model/attributes/page/page__server_rendering.json + +/** + * Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both. `page.server_rendering` + * + * Attribute Value Type: `string` {@link PAGE_SERVER_RENDERING_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * Well-defined Values: + * - `static` - The server rendered the whole page to reuse it for other requests, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route. + * - `partially_static` - The server reuses a static part of the page, and renders the other parts for this request in the same response (Next.js Partial Prerendering). + * - `dynamic` - The server rendered the whole page only for this request. Set only when the SDK knows that the server reused no part of the page. If the SDK cannot tell `dynamic` from `partially_static`, it leaves the attribute unset. + * + * @example "static" + * @example "partially_static" + * @example "dynamic" + */ +export const PAGE_SERVER_RENDERING = 'page.server_rendering'; + +/** + * Type for {@link PAGE_SERVER_RENDERING} page.server_rendering + */ +export type PAGE_SERVER_RENDERING_TYPE = string; + // Path: model/attributes/params/params__[key].json /** @@ -20950,7 +20952,6 @@ export const ATTRIBUTE_TYPE: Record = { dist: 'string', 'django.function_name': 'string', 'django.middleware_name': 'string', - 'document.static_html': 'string', effectiveConnectionType: 'string', environment: 'string', 'error.type': 'string', @@ -21304,6 +21305,7 @@ export const ATTRIBUTE_TYPE: Record = { 'otel.scope.version': 'string', 'otel.status_code': 'string', 'otel.status_description': 'string', + 'page.server_rendering': 'string', 'params.': 'string', 'performance.activationStart': 'double', 'performance.timeOrigin': 'double', @@ -21868,7 +21870,6 @@ export type AttributeName = | typeof DIST | typeof DJANGO_FUNCTION_NAME | typeof DJANGO_MIDDLEWARE_NAME - | typeof DOCUMENT_STATIC_HTML | typeof EFFECTIVECONNECTIONTYPE | typeof ENVIRONMENT | typeof ERROR_TYPE @@ -22222,6 +22223,7 @@ export type AttributeName = | typeof OTEL_SCOPE_VERSION | typeof OTEL_STATUS_CODE | typeof OTEL_STATUS_DESCRIPTION + | typeof PAGE_SERVER_RENDERING | typeof PARAMS_KEY | typeof PERFORMANCE_ACTIVATIONSTART | typeof PERFORMANCE_TIMEORIGIN @@ -27258,25 +27260,6 @@ export const ATTRIBUTE_METADATA: Record = { aliases: ['middleware.name'], changelog: [{ version: '0.19.0', prs: [520], description: 'Added django.middleware_name attribute' }], }, - 'document.static_html': { - brief: - "Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused.", - type: 'string', - keys: ['document.static_html'], - applyScrubbing: { - key: 'manual', - }, - isInOtel: false, - visibility: 'public', - example: 'full', - examples: ['full', 'partial'], - changelog: [{ version: 'next', prs: [740], description: 'Added document.static_html attribute' }], - additionalContext: [ - 'Not set when the server rendered the document only for this request, or when the SDK does not know.', - 'The server spans that rendered this HTML are in a different trace, not in the trace of the pageload span.', - "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", - ], - }, effectiveConnectionType: { brief: 'Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).', type: 'string', @@ -33517,6 +33500,26 @@ export const ATTRIBUTE_METADATA: Record = { example: 'resource not found', changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }], }, + 'page.server_rendering': { + brief: + 'Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both.', + type: 'string', + keys: ['page.server_rendering'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'static', + examples: ['static', 'partially_static', 'dynamic'], + changelog: [{ version: 'next', prs: [740], description: 'Added page.server_rendering attribute' }], + additionalContext: [ + 'Set only by an SDK that controls the server render, and only when the SDK knows the value.', + 'Not set when the server sent a page without content that the browser renders (client-side rendering), or when the SDK does not know.', + 'With `static` and `partially_static`, the server spans that rendered the reused part are in a different trace, not in the trace of the pageload span.', + "Describes how the server rendered the page, not how the page was delivered. A CDN or the browser cache can reuse a response with any value. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", + ], + }, 'params.': { brief: 'Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.', @@ -37945,7 +37948,6 @@ export type Attributes = { [DIST]?: DIST_TYPE; [DJANGO_FUNCTION_NAME]?: DJANGO_FUNCTION_NAME_TYPE; [DJANGO_MIDDLEWARE_NAME]?: DJANGO_MIDDLEWARE_NAME_TYPE; - [DOCUMENT_STATIC_HTML]?: DOCUMENT_STATIC_HTML_TYPE; [EFFECTIVECONNECTIONTYPE]?: EFFECTIVECONNECTIONTYPE_TYPE; [ENVIRONMENT]?: ENVIRONMENT_TYPE; [ERROR_TYPE]?: ERROR_TYPE_TYPE; @@ -38299,6 +38301,7 @@ export type Attributes = { [OTEL_SCOPE_VERSION]?: OTEL_SCOPE_VERSION_TYPE; [OTEL_STATUS_CODE]?: OTEL_STATUS_CODE_TYPE; [OTEL_STATUS_DESCRIPTION]?: OTEL_STATUS_DESCRIPTION_TYPE; + [PAGE_SERVER_RENDERING]?: PAGE_SERVER_RENDERING_TYPE; [PARAMS_KEY]?: PARAMS_KEY_TYPE; [PERFORMANCE_ACTIVATIONSTART]?: PERFORMANCE_ACTIVATIONSTART_TYPE; [PERFORMANCE_TIMEORIGIN]?: PERFORMANCE_TIMEORIGIN_TYPE; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index fbadc098..c0f04fea 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -1739,11 +1739,6 @@ export const SEARCH_DJANGO__FUNCTION_NAME = 'django.function_name'; */ export const SEARCH_DJANGO__MIDDLEWARE_NAME = 'django.middleware_name'; -/** - * Search name for {@link attributes.DOCUMENT_STATIC_HTML}. `document.static_html` - */ -export const SEARCH_DOCUMENT__STATIC_HTML = 'document.static_html'; - /** * Search name for {@link attributes.EFFECTIVECONNECTIONTYPE}. `effectiveConnectionType` * @@ -3778,6 +3773,11 @@ export const SEARCH_OTEL__STATUS_CODE = 'otel.status_code'; */ export const SEARCH_OTEL__STATUS_DESCRIPTION = 'otel.status_description'; +/** + * Search name for {@link attributes.PAGE_SERVER_RENDERING}. `page.server_rendering` + */ +export const SEARCH_PAGE__SERVER_RENDERING = 'page.server_rendering'; + /** * Search name for {@link attributes.PARAMS_KEY}. `params.` */ @@ -5607,7 +5607,6 @@ export type AttributeSearchName = | typeof SEARCH_DIST | typeof SEARCH_DJANGO__FUNCTION_NAME | typeof SEARCH_DJANGO__MIDDLEWARE_NAME - | typeof SEARCH_DOCUMENT__STATIC_HTML | typeof SEARCH_EFFECTIVECONNECTIONTYPE | typeof SEARCH_ENVIRONMENT | typeof SEARCH_ERROR__TYPE @@ -5968,6 +5967,7 @@ export type AttributeSearchName = | typeof SEARCH_OTEL__SCOPE__VERSION | typeof SEARCH_OTEL__STATUS_CODE | typeof SEARCH_OTEL__STATUS_DESCRIPTION + | typeof SEARCH_PAGE__SERVER_RENDERING | typeof SEARCH_PARAMS__KEY | typeof SEARCH_PERFORMANCE__ACTIVATIONSTART | typeof SEARCH_PERFORMANCE__TIMEORIGIN @@ -8234,13 +8234,6 @@ export const ATTRIBUTE_SEARCH_METADATA: Record 'starlite.middleware_name', ], }, - 'document.static_html': { - canonicalName: 'document.static_html', - type: 'string', - brief: - "Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused.", - deprecationChain: ['document.static_html'], - }, effectiveConnectionType: { canonicalName: 'network.connection.effective_type', type: 'string', @@ -10647,6 +10640,13 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'Description of the Status if it has a value, otherwise not set.', deprecationChain: ['otel.status_description'], }, + 'page.server_rendering': { + canonicalName: 'page.server_rendering', + type: 'string', + brief: + 'Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both.', + deprecationChain: ['page.server_rendering'], + }, 'params.': { canonicalName: 'params.', type: 'string', diff --git a/model/attributes/document/document__static_html.json b/model/attributes/document/document__static_html.json deleted file mode 100644 index aecf9d6a..00000000 --- a/model/attributes/document/document__static_html.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "key": "document.static_html", - "brief": "Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused.", - "type": "string", - "apply_scrubbing": { - "key": "manual" - }, - "additional_context": [ - "Not set when the server rendered the document only for this request, or when the SDK does not know.", - "The server spans that rendered this HTML are in a different trace, not in the trace of the pageload span.", - "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`." - ], - "is_in_otel": false, - "visibility": "public", - "examples": ["full", "partial"], - "enum_values": [ - { - "value": "full", - "brief": "The server reuses the whole document, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route." - }, - { - "value": "partial", - "brief": "The server reuses a static part of the document, and renders the other parts for this request in the same response (Next.js Partial Prerendering)." - } - ], - "changelog": [ - { - "version": "next", - "prs": [740], - "description": "Added document.static_html attribute" - } - ] -} diff --git a/model/attributes/page/page__server_rendering.json b/model/attributes/page/page__server_rendering.json new file mode 100644 index 00000000..5a486fe6 --- /dev/null +++ b/model/attributes/page/page__server_rendering.json @@ -0,0 +1,38 @@ +{ + "key": "page.server_rendering", + "brief": "Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "additional_context": [ + "Set only by an SDK that controls the server render, and only when the SDK knows the value.", + "Not set when the server sent a page without content that the browser renders (client-side rendering), or when the SDK does not know.", + "With `static` and `partially_static`, the server spans that rendered the reused part are in a different trace, not in the trace of the pageload span.", + "Describes how the server rendered the page, not how the page was delivered. A CDN or the browser cache can reuse a response with any value. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`." + ], + "is_in_otel": false, + "visibility": "public", + "examples": ["static", "partially_static", "dynamic"], + "enum_values": [ + { + "value": "static", + "brief": "The server rendered the whole page to reuse it for other requests, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route." + }, + { + "value": "partially_static", + "brief": "The server reuses a static part of the page, and renders the other parts for this request in the same response (Next.js Partial Prerendering)." + }, + { + "value": "dynamic", + "brief": "The server rendered the whole page only for this request. Set only when the SDK knows that the server reused no part of the page. If the SDK cannot tell `dynamic` from `partially_static`, it leaves the attribute unset." + } + ], + "changelog": [ + { + "version": "next", + "prs": [740], + "description": "Added page.server_rendering attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 48b49eba..f65648db 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -4276,21 +4276,6 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "AuthenticationMiddleware" """ - # Path: model/attributes/document/document__static_html.json - DOCUMENT_STATIC_HTML: Literal["document.static_html"] = "document.static_html" - """Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused. - - Type: str - Apply Scrubbing: manual - Defined in OTEL: No - Visibility: public - Well-defined Values: - - `full` - The server reuses the whole document, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route. - - `partial` - The server reuses a static part of the document, and renders the other parts for this request in the same response (Next.js Partial Prerendering). - Example: "full" - Example: "partial" - """ - # Path: model/attributes/effectiveConnectionType.json EFFECTIVECONNECTIONTYPE: Literal["effectiveConnectionType"] = ( "effectiveConnectionType" @@ -8804,6 +8789,23 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "resource not found" """ + # Path: model/attributes/page/page__server_rendering.json + PAGE_SERVER_RENDERING: Literal["page.server_rendering"] = "page.server_rendering" + """Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Well-defined Values: + - `static` - The server rendered the whole page to reuse it for other requests, for example a page from the build, a Next.js ISR page, or a Nuxt `swr` route. + - `partially_static` - The server reuses a static part of the page, and renders the other parts for this request in the same response (Next.js Partial Prerendering). + - `dynamic` - The server rendered the whole page only for this request. Set only when the SDK knows that the server reused no part of the page. If the SDK cannot tell `dynamic` from `partially_static`, it leaves the attribute unset. + Example: "static" + Example: "partially_static" + Example: "dynamic" + """ + # Path: model/attributes/params/params__[key].json PARAMS_KEY: Literal["params."] = "params." """Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router. @@ -17821,28 +17823,6 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), - "document.static_html": AttributeMetadata( - brief="Set on a pageload span when the server rendered the document's HTML to reuse it for other requests. The value says if the whole document or only a part of it is reused.", - type=AttributeType.STRING, - keys=("document.static_html",), - apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), - is_in_otel=False, - visibility=Visibility.PUBLIC, - example="full", - examples=["full", "partial"], - changelog=[ - ChangelogEntry( - version="next", - prs=[740], - description="Added document.static_html attribute", - ), - ], - additional_context=[ - "Not set when the server rendered the document only for this request, or when the SDK does not know.", - "The server spans that rendered this HTML are in a different trace, not in the trace of the pageload span.", - "Does not cover CDN or browser caches. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", - ], - ), "effectiveConnectionType": AttributeMetadata( brief="Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).", type=AttributeType.STRING, @@ -24957,6 +24937,29 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.0.0"), ], ), + "page.server_rendering": AttributeMetadata( + brief="Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both.", + type=AttributeType.STRING, + keys=("page.server_rendering",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="static", + examples=["static", "partially_static", "dynamic"], + changelog=[ + ChangelogEntry( + version="next", + prs=[740], + description="Added page.server_rendering attribute", + ), + ], + additional_context=[ + "Set only by an SDK that controls the server render, and only when the SDK knows the value.", + "Not set when the server sent a page without content that the browser renders (client-side rendering), or when the SDK does not know.", + "With `static` and `partially_static`, the server spans that rendered the reused part are in a different trace, not in the trace of the pageload span.", + "Describes how the server rendered the page, not how the page was delivered. A CDN or the browser cache can reuse a response with any value. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", + ], + ), "params.": AttributeMetadata( brief="Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.", type=AttributeType.STRING, @@ -29908,7 +29911,6 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "dist": str, "django.function_name": str, "django.middleware_name": str, - "document.static_html": str, "effectiveConnectionType": str, "environment": str, "error.type": str, @@ -30262,6 +30264,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "otel.scope.version": str, "otel.status_code": str, "otel.status_description": str, + "page.server_rendering": str, "params.": str, "performance.activationStart": float, "performance.timeOrigin": float, From 99940372393c15c10bf080a458bf4443ae521983 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Tue, 27 Oct 2026 13:27:52 +0100 Subject: [PATCH 7/7] name it *.type --- .../sentry-conventions/src/attributes.ts | 29 ++++++++++--------- javascript/sentry-conventions/src/search.ts | 12 ++++---- ...json => page__server_rendering__type.json} | 9 +++--- python/src/sentry_conventions/attributes.py | 19 +++++++----- 4 files changed, 37 insertions(+), 32 deletions(-) rename model/attributes/page/{page__server_rendering.json => page__server_rendering__type.json} (80%) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 2a4b7ee6..88926832 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -14729,12 +14729,12 @@ export const OTEL_STATUS_DESCRIPTION = 'otel.status_description'; */ export type OTEL_STATUS_DESCRIPTION_TYPE = string; -// Path: model/attributes/page/page__server_rendering.json +// Path: model/attributes/page/page__server_rendering__type.json /** - * Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both. `page.server_rendering` + * Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both. `page.server_rendering.type` * - * Attribute Value Type: `string` {@link PAGE_SERVER_RENDERING_TYPE} + * Attribute Value Type: `string` {@link PAGE_SERVER_RENDERING_TYPE_TYPE} * * Apply Scrubbing: manual * @@ -14750,12 +14750,12 @@ export type OTEL_STATUS_DESCRIPTION_TYPE = string; * @example "partially_static" * @example "dynamic" */ -export const PAGE_SERVER_RENDERING = 'page.server_rendering'; +export const PAGE_SERVER_RENDERING_TYPE = 'page.server_rendering.type'; /** - * Type for {@link PAGE_SERVER_RENDERING} page.server_rendering + * Type for {@link PAGE_SERVER_RENDERING_TYPE} page.server_rendering.type */ -export type PAGE_SERVER_RENDERING_TYPE = string; +export type PAGE_SERVER_RENDERING_TYPE_TYPE = string; // Path: model/attributes/params/params__[key].json @@ -21305,7 +21305,7 @@ export const ATTRIBUTE_TYPE: Record = { 'otel.scope.version': 'string', 'otel.status_code': 'string', 'otel.status_description': 'string', - 'page.server_rendering': 'string', + 'page.server_rendering.type': 'string', 'params.': 'string', 'performance.activationStart': 'double', 'performance.timeOrigin': 'double', @@ -22223,7 +22223,7 @@ export type AttributeName = | typeof OTEL_SCOPE_VERSION | typeof OTEL_STATUS_CODE | typeof OTEL_STATUS_DESCRIPTION - | typeof PAGE_SERVER_RENDERING + | typeof PAGE_SERVER_RENDERING_TYPE | typeof PARAMS_KEY | typeof PERFORMANCE_ACTIVATIONSTART | typeof PERFORMANCE_TIMEORIGIN @@ -33500,11 +33500,11 @@ export const ATTRIBUTE_METADATA: Record = { example: 'resource not found', changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }], }, - 'page.server_rendering': { + 'page.server_rendering.type': { brief: 'Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both.', type: 'string', - keys: ['page.server_rendering'], + keys: ['page.server_rendering.type'], applyScrubbing: { key: 'manual', }, @@ -33512,11 +33512,12 @@ export const ATTRIBUTE_METADATA: Record = { visibility: 'public', example: 'static', examples: ['static', 'partially_static', 'dynamic'], - changelog: [{ version: 'next', prs: [740], description: 'Added page.server_rendering attribute' }], + changelog: [{ version: 'next', prs: [740], description: 'Added page.server_rendering.type attribute' }], additionalContext: [ 'Set only by an SDK that controls the server render, and only when the SDK knows the value.', - 'Not set when the server sent a page without content that the browser renders (client-side rendering), or when the SDK does not know.', - 'With `static` and `partially_static`, the server spans that rendered the reused part are in a different trace, not in the trace of the pageload span.', + 'More values can be added later.', + 'Not set when the browser renders the content of the page (client-side rendering), or when the SDK does not know the value.', + 'With `static` and `partially_static`, the server spans that rendered the reused part are not in the trace of the pageload span. If Sentry recorded them, they are in a different trace.', "Describes how the server rendered the page, not how the page was delivered. A CDN or the browser cache can reuse a response with any value. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", ], }, @@ -38301,7 +38302,7 @@ export type Attributes = { [OTEL_SCOPE_VERSION]?: OTEL_SCOPE_VERSION_TYPE; [OTEL_STATUS_CODE]?: OTEL_STATUS_CODE_TYPE; [OTEL_STATUS_DESCRIPTION]?: OTEL_STATUS_DESCRIPTION_TYPE; - [PAGE_SERVER_RENDERING]?: PAGE_SERVER_RENDERING_TYPE; + [PAGE_SERVER_RENDERING_TYPE]?: PAGE_SERVER_RENDERING_TYPE_TYPE; [PARAMS_KEY]?: PARAMS_KEY_TYPE; [PERFORMANCE_ACTIVATIONSTART]?: PERFORMANCE_ACTIVATIONSTART_TYPE; [PERFORMANCE_TIMEORIGIN]?: PERFORMANCE_TIMEORIGIN_TYPE; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index c0f04fea..ad5dfe2a 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -3774,9 +3774,9 @@ export const SEARCH_OTEL__STATUS_CODE = 'otel.status_code'; export const SEARCH_OTEL__STATUS_DESCRIPTION = 'otel.status_description'; /** - * Search name for {@link attributes.PAGE_SERVER_RENDERING}. `page.server_rendering` + * Search name for {@link attributes.PAGE_SERVER_RENDERING_TYPE}. `page.server_rendering.type` */ -export const SEARCH_PAGE__SERVER_RENDERING = 'page.server_rendering'; +export const SEARCH_PAGE__SERVER_RENDERING__TYPE = 'page.server_rendering.type'; /** * Search name for {@link attributes.PARAMS_KEY}. `params.` @@ -5967,7 +5967,7 @@ export type AttributeSearchName = | typeof SEARCH_OTEL__SCOPE__VERSION | typeof SEARCH_OTEL__STATUS_CODE | typeof SEARCH_OTEL__STATUS_DESCRIPTION - | typeof SEARCH_PAGE__SERVER_RENDERING + | typeof SEARCH_PAGE__SERVER_RENDERING__TYPE | typeof SEARCH_PARAMS__KEY | typeof SEARCH_PERFORMANCE__ACTIVATIONSTART | typeof SEARCH_PERFORMANCE__TIMEORIGIN @@ -10640,12 +10640,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'Description of the Status if it has a value, otherwise not set.', deprecationChain: ['otel.status_description'], }, - 'page.server_rendering': { - canonicalName: 'page.server_rendering', + 'page.server_rendering.type': { + canonicalName: 'page.server_rendering.type', type: 'string', brief: 'Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both.', - deprecationChain: ['page.server_rendering'], + deprecationChain: ['page.server_rendering.type'], }, 'params.': { canonicalName: 'params.', diff --git a/model/attributes/page/page__server_rendering.json b/model/attributes/page/page__server_rendering__type.json similarity index 80% rename from model/attributes/page/page__server_rendering.json rename to model/attributes/page/page__server_rendering__type.json index 5a486fe6..4e4274b8 100644 --- a/model/attributes/page/page__server_rendering.json +++ b/model/attributes/page/page__server_rendering__type.json @@ -1,5 +1,5 @@ { - "key": "page.server_rendering", + "key": "page.server_rendering.type", "brief": "Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both.", "type": "string", "apply_scrubbing": { @@ -7,8 +7,9 @@ }, "additional_context": [ "Set only by an SDK that controls the server render, and only when the SDK knows the value.", - "Not set when the server sent a page without content that the browser renders (client-side rendering), or when the SDK does not know.", - "With `static` and `partially_static`, the server spans that rendered the reused part are in a different trace, not in the trace of the pageload span.", + "More values can be added later.", + "Not set when the browser renders the content of the page (client-side rendering), or when the SDK does not know the value.", + "With `static` and `partially_static`, the server spans that rendered the reused part are not in the trace of the pageload span. If Sentry recorded them, they are in a different trace.", "Describes how the server rendered the page, not how the page was delivered. A CDN or the browser cache can reuse a response with any value. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`." ], "is_in_otel": false, @@ -32,7 +33,7 @@ { "version": "next", "prs": [740], - "description": "Added page.server_rendering attribute" + "description": "Added page.server_rendering.type attribute" } ] } diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index f65648db..5c663825 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -8789,8 +8789,10 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "resource not found" """ - # Path: model/attributes/page/page__server_rendering.json - PAGE_SERVER_RENDERING: Literal["page.server_rendering"] = "page.server_rendering" + # Path: model/attributes/page/page__server_rendering__type.json + PAGE_SERVER_RENDERING_TYPE: Literal["page.server_rendering.type"] = ( + "page.server_rendering.type" + ) """Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both. Type: str @@ -24937,10 +24939,10 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.0.0"), ], ), - "page.server_rendering": AttributeMetadata( + "page.server_rendering.type": AttributeMetadata( brief="Set on a pageload span. Describes how the server rendered the content of the page: to reuse it for other requests, only for this request, or a mix of both.", type=AttributeType.STRING, - keys=("page.server_rendering",), + keys=("page.server_rendering.type",), apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), is_in_otel=False, visibility=Visibility.PUBLIC, @@ -24950,13 +24952,14 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry( version="next", prs=[740], - description="Added page.server_rendering attribute", + description="Added page.server_rendering.type attribute", ), ], additional_context=[ "Set only by an SDK that controls the server render, and only when the SDK knows the value.", - "Not set when the server sent a page without content that the browser renders (client-side rendering), or when the SDK does not know.", - "With `static` and `partially_static`, the server spans that rendered the reused part are in a different trace, not in the trace of the pageload span.", + "More values can be added later.", + "Not set when the browser renders the content of the page (client-side rendering), or when the SDK does not know the value.", + "With `static` and `partially_static`, the server spans that rendered the reused part are not in the trace of the pageload span. If Sentry recorded them, they are in a different trace.", "Describes how the server rendered the page, not how the page was delivered. A CDN or the browser cache can reuse a response with any value. For the browser's own [prerendering](https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering), see `browser.navigation.type`.", ], ), @@ -30264,7 +30267,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "otel.scope.version": str, "otel.status_code": str, "otel.status_description": str, - "page.server_rendering": str, + "page.server_rendering.type": str, "params.": str, "performance.activationStart": float, "performance.timeOrigin": float,