From d9b0451c01cab9c3c991bd2f5f3571da6ec1df83 Mon Sep 17 00:00:00 2001 From: romanG <158156364+RomanGaignault@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:57:20 +0100 Subject: [PATCH] [RUM-6801] Add worker property (#230) * add new worker property * remove content type property --- lib/cjs/generated/rum.d.ts | 14 ++++++++++++++ lib/esm/generated/rum.d.ts | 14 ++++++++++++++ samples/rum-events/resource.json | 4 ++++ schemas/rum/resource-schema.json | 20 ++++++++++++++++++++ 4 files changed, 52 insertions(+) diff --git a/lib/cjs/generated/rum.d.ts b/lib/cjs/generated/rum.d.ts index 61d0523..5a52865 100644 --- a/lib/cjs/generated/rum.d.ts +++ b/lib/cjs/generated/rum.d.ts @@ -563,6 +563,20 @@ export declare type RumResourceEvent = CommonProperties & ActionChildProperties * Render blocking status of the resource */ readonly render_blocking_status?: 'blocking' | 'non-blocking'; + /** + * Worker phase properties + */ + readonly worker?: { + /** + * Duration in nanoseconds of the resource worker phase + */ + readonly duration: number; + /** + * Duration in nanoseconds between start of the request and start of the worker phase + */ + readonly start: number; + [k: string]: unknown; + }; /** * Redirect phase properties */ diff --git a/lib/esm/generated/rum.d.ts b/lib/esm/generated/rum.d.ts index 61d0523..5a52865 100644 --- a/lib/esm/generated/rum.d.ts +++ b/lib/esm/generated/rum.d.ts @@ -563,6 +563,20 @@ export declare type RumResourceEvent = CommonProperties & ActionChildProperties * Render blocking status of the resource */ readonly render_blocking_status?: 'blocking' | 'non-blocking'; + /** + * Worker phase properties + */ + readonly worker?: { + /** + * Duration in nanoseconds of the resource worker phase + */ + readonly duration: number; + /** + * Duration in nanoseconds between start of the request and start of the worker phase + */ + readonly start: number; + [k: string]: unknown; + }; /** * Redirect phase properties */ diff --git a/samples/rum-events/resource.json b/samples/rum-events/resource.json index ddf0d04..f515fda 100644 --- a/samples/rum-events/resource.json +++ b/samples/rum-events/resource.json @@ -26,6 +26,10 @@ "decoded_body_size": 3599, "transfer_size": 3699, "render_blocking_status": "non-blocking", + "worker": { + "duration": 8000000, + "start": 2000000 + }, "download": { "duration": 545000, "start": 246035000 diff --git a/schemas/rum/resource-schema.json b/schemas/rum/resource-schema.json index 295ca31..09b0bee 100644 --- a/schemas/rum/resource-schema.json +++ b/schemas/rum/resource-schema.json @@ -93,6 +93,26 @@ "enum": ["blocking", "non-blocking"], "readOnly": true }, + "worker": { + "type": "object", + "description": "Worker phase properties", + "required": ["duration", "start"], + "properties": { + "duration": { + "type": "integer", + "description": "Duration in nanoseconds of the resource worker phase", + "minimum": 0, + "readOnly": true + }, + "start": { + "type": "integer", + "description": "Duration in nanoseconds between start of the request and start of the worker phase", + "minimum": 0, + "readOnly": true + } + }, + "readOnly": true + }, "redirect": { "type": "object", "description": "Redirect phase properties",