diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 0bae7a7e..00299ff7 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -15488,6 +15488,34 @@ export const OTEL_STATUS_DESCRIPTION = 'otel.status_description'; */ export type OTEL_STATUS_DESCRIPTION_TYPE = string; +// 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.type` + * + * Attribute Value Type: `string` {@link PAGE_SERVER_RENDERING_TYPE_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_TYPE = 'page.server_rendering.type'; + +/** + * Type for {@link PAGE_SERVER_RENDERING_TYPE} page.server_rendering.type + */ +export type PAGE_SERVER_RENDERING_TYPE_TYPE = string; + // Path: model/attributes/params/params__[key].json /** @@ -22099,6 +22127,7 @@ export const ATTRIBUTE_TYPE: Record = { 'otel.scope.version': 'string', 'otel.status_code': 'string', 'otel.status_description': 'string', + 'page.server_rendering.type': 'string', 'params.': 'string', 'performance.activationStart': 'double', 'performance.timeOrigin': 'double', @@ -23052,6 +23081,7 @@ export type AttributeName = | typeof OTEL_SCOPE_VERSION | typeof OTEL_STATUS_CODE | typeof OTEL_STATUS_DESCRIPTION + | typeof PAGE_SERVER_RENDERING_TYPE | typeof PARAMS_KEY | typeof PERFORMANCE_ACTIVATIONSTART | typeof PERFORMANCE_TIMEORIGIN @@ -34936,6 +34966,27 @@ export const ATTRIBUTE_METADATA: Record = { example: 'resource not found', changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }], }, + '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.type'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'static', + examples: ['static', 'partially_static', 'dynamic'], + 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.', + '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`.", + ], + }, 'params.': { brief: 'Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.', @@ -39777,6 +39828,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_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 3243a208..722720cc 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -3949,6 +3949,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_TYPE}. `page.server_rendering.type` + */ +export const SEARCH_PAGE__SERVER_RENDERING__TYPE = 'page.server_rendering.type'; + /** * Search name for {@link attributes.PARAMS_KEY}. `params.` */ @@ -6180,6 +6185,7 @@ export type AttributeSearchName = | typeof SEARCH_OTEL__SCOPE__VERSION | typeof SEARCH_OTEL__STATUS_CODE | typeof SEARCH_OTEL__STATUS_DESCRIPTION + | typeof SEARCH_PAGE__SERVER_RENDERING__TYPE | typeof SEARCH_PARAMS__KEY | typeof SEARCH_PERFORMANCE__ACTIVATIONSTART | typeof SEARCH_PERFORMANCE__TIMEORIGIN @@ -11065,6 +11071,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.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.type'], + }, 'params.': { canonicalName: 'params.', type: 'string', diff --git a/model/attributes/page/page__server_rendering__type.json b/model/attributes/page/page__server_rendering__type.json new file mode 100644 index 00000000..4e4274b8 --- /dev/null +++ b/model/attributes/page/page__server_rendering__type.json @@ -0,0 +1,39 @@ +{ + "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": { + "key": "manual" + }, + "additional_context": [ + "Set only by an SDK that controls the server render, and only when the SDK knows the value.", + "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, + "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.type attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index a70dad54..86b9fca7 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -9258,6 +9258,25 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "resource not found" """ + # 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 + 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. @@ -26155,6 +26174,30 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.0.0"), ], ), + "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.type",), + 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.type attribute", + ), + ], + additional_context=[ + "Set only by an SDK that controls the server render, and only when the SDK knows the value.", + "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`.", + ], + ), "params.": AttributeMetadata( brief="Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.", type=AttributeType.STRING, @@ -31525,6 +31568,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "otel.scope.version": str, "otel.status_code": str, "otel.status_description": str, + "page.server_rendering.type": str, "params.": str, "performance.activationStart": float, "performance.timeOrigin": float,