diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 670cc9ac..86f60be9 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -2826,6 +2826,95 @@ export const BLOCKED_MAIN_THREAD = 'blocked_main_thread'; */ export type BLOCKED_MAIN_THREAD_TYPE = boolean; +// Path: model/attributes/browser/browser__bfcache__frame.json + +/** + * Which frame in the page's frame tree a back/forward cache not-restored reason originated from: the top document or a child frame. `browser.bfcache.frame` + * + * Attribute Value Type: `string` {@link BROWSER_BFCACHE_FRAME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "top" + * @example "child" + */ +export const BROWSER_BFCACHE_FRAME = 'browser.bfcache.frame'; + +/** + * Type for {@link BROWSER_BFCACHE_FRAME} browser.bfcache.frame + */ +export type BROWSER_BFCACHE_FRAME_TYPE = string; + +// Path: model/attributes/browser/browser__bfcache__not_restored_reason_count.json + +/** + * The number of reported reasons a page was not restored from the back/forward cache on a back/forward navigation. 0 when the browser reported no reasons (e.g. non-Chromium browsers). `browser.bfcache.not_restored_reason_count` + * + * Attribute Value Type: `number` {@link BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example 2 + */ +export const BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT = 'browser.bfcache.not_restored_reason_count'; + +/** + * Type for {@link BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT} browser.bfcache.not_restored_reason_count + */ +export type BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT_TYPE = number; + +// Path: model/attributes/browser/browser__bfcache__outcome.json + +/** + * Whether a back/forward navigation was restored from the browser's back/forward cache (bfcache). 'hit' means the page was restored; 'miss' means it was reloaded. `browser.bfcache.outcome` + * + * Attribute Value Type: `string` {@link BROWSER_BFCACHE_OUTCOME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "hit" + * @example "miss" + */ +export const BROWSER_BFCACHE_OUTCOME = 'browser.bfcache.outcome'; + +/** + * Type for {@link BROWSER_BFCACHE_OUTCOME} browser.bfcache.outcome + */ +export type BROWSER_BFCACHE_OUTCOME_TYPE = string; + +// Path: model/attributes/browser/browser__bfcache__reason.json + +/** + * A browser-reported reason a page was not restored from the back/forward cache on a back/forward navigation, taken from the notRestoredReasons API. Reported per reason (a single miss can have several). Currently Chromium-only. `browser.bfcache.reason` + * + * Attribute Value Type: `string` {@link BROWSER_BFCACHE_REASON_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "unload-listener" + * @example "websocket" + * @example "idbversionchangeevent" + * @example "response-cache-control-no-store" + */ +export const BROWSER_BFCACHE_REASON = 'browser.bfcache.reason'; + +/** + * Type for {@link BROWSER_BFCACHE_REASON} browser.bfcache.reason + */ +export type BROWSER_BFCACHE_REASON_TYPE = string; + // Path: model/attributes/browser/browser__name.json /** @@ -17313,6 +17402,10 @@ export const ATTRIBUTE_TYPE: Record = { 'aws.step_functions.activity.arn': 'string', 'aws.step_functions.state_machine.arn': 'string', blocked_main_thread: 'boolean', + 'browser.bfcache.frame': 'string', + 'browser.bfcache.not_restored_reason_count': 'integer', + 'browser.bfcache.outcome': 'string', + 'browser.bfcache.reason': 'string', 'browser.name': 'string', 'browser.performance.navigation.activation_start': 'double', 'browser.performance.time_origin': 'double', @@ -18087,6 +18180,10 @@ export type AttributeName = | typeof AWS_STEP_FUNCTIONS_ACTIVITY_ARN | typeof AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN | typeof BLOCKED_MAIN_THREAD + | typeof BROWSER_BFCACHE_FRAME + | typeof BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT + | typeof BROWSER_BFCACHE_OUTCOME + | typeof BROWSER_BFCACHE_REASON | typeof BROWSER_NAME | typeof BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START | typeof BROWSER_PERFORMANCE_TIME_ORIGIN @@ -20563,6 +20660,60 @@ export const ATTRIBUTE_METADATA: Record = { example: true, changelog: [{ version: '0.0.0' }], }, + 'browser.bfcache.frame': { + brief: + "Which frame in the page's frame tree a back/forward cache not-restored reason originated from: the top document or a child frame.", + type: 'string', + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'top', + examples: ['top', 'child'], + changelog: [{ version: 'next', prs: [513], description: 'Added browser.bfcache.frame attribute' }], + }, + 'browser.bfcache.not_restored_reason_count': { + brief: + 'The number of reported reasons a page was not restored from the back/forward cache on a back/forward navigation. 0 when the browser reported no reasons (e.g. non-Chromium browsers).', + type: 'integer', + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 2, + examples: [2], + changelog: [ + { version: 'next', prs: [513], description: 'Added browser.bfcache.not_restored_reason_count attribute' }, + ], + }, + 'browser.bfcache.outcome': { + brief: + "Whether a back/forward navigation was restored from the browser's back/forward cache (bfcache). 'hit' means the page was restored; 'miss' means it was reloaded.", + type: 'string', + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'hit', + examples: ['hit', 'miss'], + changelog: [{ version: 'next', prs: [513], description: 'Added browser.bfcache.outcome attribute' }], + }, + 'browser.bfcache.reason': { + brief: + 'A browser-reported reason a page was not restored from the back/forward cache on a back/forward navigation, taken from the notRestoredReasons API. Reported per reason (a single miss can have several). Currently Chromium-only.', + type: 'string', + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'unload-listener', + examples: ['unload-listener', 'websocket', 'idbversionchangeevent', 'response-cache-control-no-store'], + changelog: [{ version: 'next', prs: [513], description: 'Added browser.bfcache.reason attribute' }], + }, 'browser.name': { brief: 'The name of the browser.', type: 'string', @@ -29457,6 +29608,10 @@ export type Attributes = { [AWS_STEP_FUNCTIONS_ACTIVITY_ARN]?: AWS_STEP_FUNCTIONS_ACTIVITY_ARN_TYPE; [AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN]?: AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN_TYPE; [BLOCKED_MAIN_THREAD]?: BLOCKED_MAIN_THREAD_TYPE; + [BROWSER_BFCACHE_FRAME]?: BROWSER_BFCACHE_FRAME_TYPE; + [BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT]?: BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT_TYPE; + [BROWSER_BFCACHE_OUTCOME]?: BROWSER_BFCACHE_OUTCOME_TYPE; + [BROWSER_BFCACHE_REASON]?: BROWSER_BFCACHE_REASON_TYPE; [BROWSER_NAME]?: BROWSER_NAME_TYPE; [BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START]?: BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START_TYPE; [BROWSER_PERFORMANCE_TIME_ORIGIN]?: BROWSER_PERFORMANCE_TIME_ORIGIN_TYPE; diff --git a/model/attributes/browser/browser__bfcache__frame.json b/model/attributes/browser/browser__bfcache__frame.json new file mode 100644 index 00000000..b9017f2a --- /dev/null +++ b/model/attributes/browser/browser__bfcache__frame.json @@ -0,0 +1,18 @@ +{ + "key": "browser.bfcache.frame", + "brief": "Which frame in the page's frame tree a back/forward cache not-restored reason originated from: the top document or a child frame.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["top", "child"], + "changelog": [ + { + "version": "next", + "prs": [513], + "description": "Added browser.bfcache.frame attribute" + } + ] +} diff --git a/model/attributes/browser/browser__bfcache__not_restored_reason_count.json b/model/attributes/browser/browser__bfcache__not_restored_reason_count.json new file mode 100644 index 00000000..7ea12d06 --- /dev/null +++ b/model/attributes/browser/browser__bfcache__not_restored_reason_count.json @@ -0,0 +1,18 @@ +{ + "key": "browser.bfcache.not_restored_reason_count", + "brief": "The number of reported reasons a page was not restored from the back/forward cache on a back/forward navigation. 0 when the browser reported no reasons (e.g. non-Chromium browsers).", + "type": "integer", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": [2], + "changelog": [ + { + "version": "next", + "prs": [513], + "description": "Added browser.bfcache.not_restored_reason_count attribute" + } + ] +} diff --git a/model/attributes/browser/browser__bfcache__outcome.json b/model/attributes/browser/browser__bfcache__outcome.json new file mode 100644 index 00000000..df6af585 --- /dev/null +++ b/model/attributes/browser/browser__bfcache__outcome.json @@ -0,0 +1,18 @@ +{ + "key": "browser.bfcache.outcome", + "brief": "Whether a back/forward navigation was restored from the browser's back/forward cache (bfcache). 'hit' means the page was restored; 'miss' means it was reloaded.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["hit", "miss"], + "changelog": [ + { + "version": "next", + "prs": [513], + "description": "Added browser.bfcache.outcome attribute" + } + ] +} diff --git a/model/attributes/browser/browser__bfcache__reason.json b/model/attributes/browser/browser__bfcache__reason.json new file mode 100644 index 00000000..a7151c2f --- /dev/null +++ b/model/attributes/browser/browser__bfcache__reason.json @@ -0,0 +1,18 @@ +{ + "key": "browser.bfcache.reason", + "brief": "A browser-reported reason a page was not restored from the back/forward cache on a back/forward navigation, taken from the notRestoredReasons API. Reported per reason (a single miss can have several). Currently Chromium-only.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["unload-listener", "websocket", "idbversionchangeevent", "response-cache-control-no-store"], + "changelog": [ + { + "version": "next", + "prs": [513], + "description": "Added browser.bfcache.reason attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 86c4dca2..562399e6 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -1937,6 +1937,59 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: true """ + # Path: model/attributes/browser/browser__bfcache__frame.json + BROWSER_BFCACHE_FRAME: Literal["browser.bfcache.frame"] = "browser.bfcache.frame" + """Which frame in the page's frame tree a back/forward cache not-restored reason originated from: the top document or a child frame. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "top" + Example: "child" + """ + + # Path: model/attributes/browser/browser__bfcache__not_restored_reason_count.json + BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT: Literal[ + "browser.bfcache.not_restored_reason_count" + ] = "browser.bfcache.not_restored_reason_count" + """The number of reported reasons a page was not restored from the back/forward cache on a back/forward navigation. 0 when the browser reported no reasons (e.g. non-Chromium browsers). + + Type: int + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: 2 + """ + + # Path: model/attributes/browser/browser__bfcache__outcome.json + BROWSER_BFCACHE_OUTCOME: Literal["browser.bfcache.outcome"] = ( + "browser.bfcache.outcome" + ) + """Whether a back/forward navigation was restored from the browser's back/forward cache (bfcache). 'hit' means the page was restored; 'miss' means it was reloaded. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "hit" + Example: "miss" + """ + + # Path: model/attributes/browser/browser__bfcache__reason.json + BROWSER_BFCACHE_REASON: Literal["browser.bfcache.reason"] = "browser.bfcache.reason" + """A browser-reported reason a page was not restored from the back/forward cache on a back/forward navigation, taken from the notRestoredReasons API. Reported per reason (a single miss can have several). Currently Chromium-only. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "unload-listener" + Example: "websocket" + Example: "idbversionchangeevent" + Example: "response-cache-control-no-store" + """ + # Path: model/attributes/browser/browser__name.json BROWSER_NAME: Literal["browser.name"] = "browser.name" """The name of the browser. @@ -11919,6 +11972,75 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.0.0"), ], ), + "browser.bfcache.frame": AttributeMetadata( + brief="Which frame in the page's frame tree a back/forward cache not-restored reason originated from: the top document or a child frame.", + type=AttributeType.STRING, + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="top", + examples=["top", "child"], + changelog=[ + ChangelogEntry( + version="next", + prs=[513], + description="Added browser.bfcache.frame attribute", + ), + ], + ), + "browser.bfcache.not_restored_reason_count": AttributeMetadata( + brief="The number of reported reasons a page was not restored from the back/forward cache on a back/forward navigation. 0 when the browser reported no reasons (e.g. non-Chromium browsers).", + type=AttributeType.INTEGER, + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example=2, + examples=[2], + changelog=[ + ChangelogEntry( + version="next", + prs=[513], + description="Added browser.bfcache.not_restored_reason_count attribute", + ), + ], + ), + "browser.bfcache.outcome": AttributeMetadata( + brief="Whether a back/forward navigation was restored from the browser's back/forward cache (bfcache). 'hit' means the page was restored; 'miss' means it was reloaded.", + type=AttributeType.STRING, + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="hit", + examples=["hit", "miss"], + changelog=[ + ChangelogEntry( + version="next", + prs=[513], + description="Added browser.bfcache.outcome attribute", + ), + ], + ), + "browser.bfcache.reason": AttributeMetadata( + brief="A browser-reported reason a page was not restored from the back/forward cache on a back/forward navigation, taken from the notRestoredReasons API. Reported per reason (a single miss can have several). Currently Chromium-only.", + type=AttributeType.STRING, + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="unload-listener", + examples=[ + "unload-listener", + "websocket", + "idbversionchangeevent", + "response-cache-control-no-store", + ], + changelog=[ + ChangelogEntry( + version="next", + prs=[513], + description="Added browser.bfcache.reason attribute", + ), + ], + ), "browser.name": AttributeMetadata( brief="The name of the browser.", type=AttributeType.STRING, @@ -21370,6 +21492,10 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "aws.step_functions.activity.arn": str, "aws.step_functions.state_machine.arn": str, "blocked_main_thread": bool, + "browser.bfcache.frame": str, + "browser.bfcache.not_restored_reason_count": int, + "browser.bfcache.outcome": str, + "browser.bfcache.reason": str, "browser.name": str, "browser.performance.navigation.activation_start": float, "browser.performance.time_origin": float,