diff --git a/lib/cjs/generated/rum.d.ts b/lib/cjs/generated/rum.d.ts index 26793c33..2ead0aa4 100644 --- a/lib/cjs/generated/rum.d.ts +++ b/lib/cjs/generated/rum.d.ts @@ -901,6 +901,10 @@ export declare type RumViewEvent = CommonProperties & ViewContainerSchema & Stre * Duration in ns to the response start of the document request */ readonly first_byte?: number; + /** + * Reasons why the document was blocked from using the back/forward cache + */ + not_restored_reasons?: NotRestoredReasonsSchema; /** * User custom timings of the view. As timing name is used as facet path, it must contain only letters, digits, or the characters - _ . @ $ */ @@ -1755,6 +1759,42 @@ export interface StreamSchema { }; [k: string]: unknown; } +/** + * Reasons why the document was blocked from using the back/forward cache + */ +export interface NotRestoredReasonsSchema { + /** + * Array of NotRestoredReasons objects for child iframes + */ + readonly children?: NotRestoredReasonsSchema[]; + /** + * ID attribute value of the iframe + */ + readonly id?: string | null; + /** + * Name attribute value of the iframe + */ + readonly name?: string | null; + /** + * Array of reasons why the page was blocked from using bfcache + */ + readonly reasons?: { + /** + * The reason why the page was blocked + */ + readonly reason: string; + [k: string]: unknown; + }[] | null; + /** + * Source path of the iframe + */ + readonly src?: string | null; + /** + * URL of the navigated page or iframe + */ + readonly url?: string | null; + [k: string]: unknown; +} /** * Schema of properties for a technical performance metric */ diff --git a/lib/esm/generated/rum.d.ts b/lib/esm/generated/rum.d.ts index 26793c33..2ead0aa4 100644 --- a/lib/esm/generated/rum.d.ts +++ b/lib/esm/generated/rum.d.ts @@ -901,6 +901,10 @@ export declare type RumViewEvent = CommonProperties & ViewContainerSchema & Stre * Duration in ns to the response start of the document request */ readonly first_byte?: number; + /** + * Reasons why the document was blocked from using the back/forward cache + */ + not_restored_reasons?: NotRestoredReasonsSchema; /** * User custom timings of the view. As timing name is used as facet path, it must contain only letters, digits, or the characters - _ . @ $ */ @@ -1755,6 +1759,42 @@ export interface StreamSchema { }; [k: string]: unknown; } +/** + * Reasons why the document was blocked from using the back/forward cache + */ +export interface NotRestoredReasonsSchema { + /** + * Array of NotRestoredReasons objects for child iframes + */ + readonly children?: NotRestoredReasonsSchema[]; + /** + * ID attribute value of the iframe + */ + readonly id?: string | null; + /** + * Name attribute value of the iframe + */ + readonly name?: string | null; + /** + * Array of reasons why the page was blocked from using bfcache + */ + readonly reasons?: { + /** + * The reason why the page was blocked + */ + readonly reason: string; + [k: string]: unknown; + }[] | null; + /** + * Source path of the iframe + */ + readonly src?: string | null; + /** + * URL of the navigated page or iframe + */ + readonly url?: string | null; + [k: string]: unknown; +} /** * Schema of properties for a technical performance metric */ diff --git a/samples/rum-events/view.json b/samples/rum-events/view.json index ba7d7139..56d0c2e5 100644 --- a/samples/rum-events/view.json +++ b/samples/rum-events/view.json @@ -24,6 +24,42 @@ "dom_content_loaded": 951715000, "dom_interactive": 906695000, "load_event": 2154370000, + "not_restored_reasons": { + "children": [ + { + "children": [], + "id": "iframe-1", + "name": "myFrame", + "reasons": null, + "src": "./frame.html", + "url": "https://example.com/frame.html" + }, + { + "children": [], + "id": "iframe-2", + "name": "anotherFrame", + "reasons": [ + { + "reason": "response-cache-control-no-store" + } + ], + "src": "./another.html", + "url": "https://example.com/another.html" + } + ], + "id": null, + "name": null, + "reasons": [ + { + "reason": "unload-listener" + }, + { + "reason": "beforeunload-listener" + } + ], + "src": null, + "url": "https://app.datadoghq.com/rum/explorer?live=1h&query=&tab=view" + }, "interaction_to_next_paint": 20000000, "interaction_to_next_paint_time": 20000000, "interaction_to_next_paint_target_selector": "#foo", diff --git a/schemas/rum/_not-restored-reasons-schema.json b/schemas/rum/_not-restored-reasons-schema.json new file mode 100644 index 00000000..1a2b21ac --- /dev/null +++ b/schemas/rum/_not-restored-reasons-schema.json @@ -0,0 +1,55 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "rum/_not-restored-reasons-schema.json", + "title": "NotRestoredReasonsSchema", + "type": "object", + "description": "Reasons why the document was blocked from using the back/forward cache", + "properties": { + "children": { + "type": "array", + "description": "Array of NotRestoredReasons objects for child iframes", + "items": { + "$ref": "#" + }, + "readOnly": true + }, + "id": { + "type": ["string", "null"], + "description": "ID attribute value of the iframe", + "readOnly": true + }, + "name": { + "type": ["string", "null"], + "description": "Name attribute value of the iframe", + "readOnly": true + }, + "reasons": { + "type": ["array", "null"], + "description": "Array of reasons why the page was blocked from using bfcache", + "items": { + "type": "object", + "required": ["reason"], + "properties": { + "reason": { + "type": "string", + "description": "The reason why the page was blocked", + "readOnly": true + } + }, + "readOnly": true + }, + "readOnly": true + }, + "src": { + "type": ["string", "null"], + "description": "Source path of the iframe", + "readOnly": true + }, + "url": { + "type": ["string", "null"], + "description": "URL of the navigated page or iframe", + "readOnly": true + } + }, + "readOnly": true +} diff --git a/schemas/rum/view-schema.json b/schemas/rum/view-schema.json index 01a14949..2b9ba549 100644 --- a/schemas/rum/view-schema.json +++ b/schemas/rum/view-schema.json @@ -177,6 +177,10 @@ "minimum": 0, "readOnly": true }, + "not_restored_reasons": { + "description": "Reasons why the document was blocked from using the back/forward cache", + "allOf": [{ "$ref": "_not-restored-reasons-schema.json" }] + }, "custom_timings": { "type": "object", "description": "User custom timings of the view. As timing name is used as facet path, it must contain only letters, digits, or the characters - _ . @ $",