Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down Expand Up @@ -22099,6 +22127,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
'otel.scope.version': 'string',
'otel.status_code': 'string',
'otel.status_description': 'string',
'page.server_rendering.type': 'string',
'params.<key>': 'string',
'performance.activationStart': 'double',
'performance.timeOrigin': 'double',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -34936,6 +34966,27 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
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.<key>': {
brief:
'Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.',
Expand Down Expand Up @@ -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;
Expand Down
13 changes: 13 additions & 0 deletions javascript/sentry-conventions/src/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.<key>`
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -11065,6 +11071,13 @@ export const ATTRIBUTE_SEARCH_METADATA: Record<string, AttributeSearchMetadata>
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.<key>': {
canonicalName: 'params.<key>',
type: 'string',
Expand Down
39 changes: 39 additions & 0 deletions model/attributes/page/page__server_rendering__type.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
44 changes: 44 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.<key>"] = "params.<key>"
"""Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.
Expand Down Expand Up @@ -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.<key>": AttributeMetadata(
brief="Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.",
type=AttributeType.STRING,
Expand Down Expand Up @@ -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.<key>": str,
"performance.activationStart": float,
"performance.timeOrigin": float,
Expand Down
Loading