Skip to content

Commit

Permalink
[RUM-6801] Add worker property (#230)
Browse files Browse the repository at this point in the history
* add new worker property

* remove content type property
  • Loading branch information
RomanGaignault authored Nov 15, 2024
1 parent 3e308f2 commit d9b0451
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/cjs/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
14 changes: 14 additions & 0 deletions lib/esm/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
4 changes: 4 additions & 0 deletions samples/rum-events/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions schemas/rum/resource-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d9b0451

Please sign in to comment.