From 010e0c543b6600d3ae6bf1f499f4cbb2157ce20a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Zugmeyer?= Date: Wed, 26 May 2021 15:54:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20update=20events=20forma?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/rum-core/src/rumEvent.types.ts | 48 +++++++++++++++++++++++++ rum-events-format | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/packages/rum-core/src/rumEvent.types.ts b/packages/rum-core/src/rumEvent.types.ts index 1e64d5933a..1126de850c 100644 --- a/packages/rum-core/src/rumEvent.types.ts +++ b/packages/rum-core/src/rumEvent.types.ts @@ -83,6 +83,16 @@ export type RumActionEvent = CommonProperties & { } [k: string]: unknown } + /** + * View properties + */ + readonly view?: { + /** + * Is the action starting in the foreground (focus in browser) + */ + readonly in_foreground?: boolean + [k: string]: unknown + } [k: string]: unknown } /** @@ -97,6 +107,10 @@ export type RumErrorEvent = CommonProperties & { * Error properties */ readonly error: { + /** + * UUID of the error + */ + readonly id?: string /** * Error message */ @@ -179,6 +193,16 @@ export type RumErrorEvent = CommonProperties & { readonly id: string [k: string]: unknown } + /** + * View properties + */ + readonly view?: { + /** + * Is the error starting in the foreground (focus in browser) + */ + readonly in_foreground?: boolean + [k: string]: unknown + } [k: string]: unknown } /** @@ -193,6 +217,10 @@ export type RumLongTaskEvent = CommonProperties & { * Long Task properties */ readonly long_task: { + /** + * UUID of the long task + */ + readonly id?: string /** * Duration in ns of the long task */ @@ -523,6 +551,20 @@ export type RumViewEvent = CommonProperties & { readonly count: number [k: string]: unknown } + /** + * List of the periods of time the user had the view in foreground (focused in the browser) + */ + readonly in_foreground_periods?: { + /** + * Duration in ns between start of the view and start of foreground period + */ + readonly start: number + /** + * Duration in ns of the view foreground period + */ + readonly duration: number + [k: string]: unknown + }[] [k: string]: unknown } /** @@ -666,5 +708,11 @@ export interface CommonProperties { readonly format_version: number [k: string]: unknown } + /** + * User provided context + */ + context?: { + [k: string]: unknown + } [k: string]: unknown } diff --git a/rum-events-format b/rum-events-format index a37c41a4ac..a5a7feda85 160000 --- a/rum-events-format +++ b/rum-events-format @@ -1 +1 @@ -Subproject commit a37c41a4ac1aa3bfdc8d1fcecb35e4d1e07adddc +Subproject commit a5a7feda859dcd36e95f0f208e725c65d28783b2