Skip to content

Commit 4c3e63b

Browse files
[RUM-10511] Add user story vital type (#286)
* feat:add user story * Update lib/cjs/generated/rum.d.ts Co-authored-by: Benoît <[email protected]> * fix: naming * build * fix: add latest failure reason * feat: update naming and description * fix: build * fix: use update instead of touch --------- Co-authored-by: Benoît <[email protected]>
1 parent 8415508 commit 4c3e63b

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

lib/cjs/generated/rum.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,11 +1154,15 @@ export declare type RumVitalEvent = CommonProperties & ViewContainerSchema & {
11541154
/**
11551155
* Type of the vital
11561156
*/
1157-
readonly type: 'duration';
1157+
readonly type: 'duration' | 'step';
11581158
/**
11591159
* UUID of the vital
11601160
*/
11611161
readonly id: string;
1162+
/**
1163+
* UUID for linking the step vital to the parent event, if applicable
1164+
*/
1165+
readonly parent_id?: string;
11621166
/**
11631167
* Name of the vital, as it is also used as facet path for its value, it must contain only letters, digits, or the characters - _ . @ $
11641168
*/
@@ -1177,6 +1181,14 @@ export declare type RumVitalEvent = CommonProperties & ViewContainerSchema & {
11771181
readonly custom?: {
11781182
[k: string]: number;
11791183
};
1184+
/**
1185+
* Type of the step that triggered the vital, if applicable
1186+
*/
1187+
readonly step_type?: 'start' | 'update' | 'retry' | 'end';
1188+
/**
1189+
* Reason for the failure of the step, if applicable
1190+
*/
1191+
readonly failure_reason?: 'error' | 'abandoned' | 'other';
11801192
[k: string]: unknown;
11811193
};
11821194
/**

lib/esm/generated/rum.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,11 +1154,15 @@ export declare type RumVitalEvent = CommonProperties & ViewContainerSchema & {
11541154
/**
11551155
* Type of the vital
11561156
*/
1157-
readonly type: 'duration';
1157+
readonly type: 'duration' | 'step';
11581158
/**
11591159
* UUID of the vital
11601160
*/
11611161
readonly id: string;
1162+
/**
1163+
* UUID for linking the step vital to the parent event, if applicable
1164+
*/
1165+
readonly parent_id?: string;
11621166
/**
11631167
* Name of the vital, as it is also used as facet path for its value, it must contain only letters, digits, or the characters - _ . @ $
11641168
*/
@@ -1177,6 +1181,14 @@ export declare type RumVitalEvent = CommonProperties & ViewContainerSchema & {
11771181
readonly custom?: {
11781182
[k: string]: number;
11791183
};
1184+
/**
1185+
* Type of the step that triggered the vital, if applicable
1186+
*/
1187+
readonly step_type?: 'start' | 'update' | 'retry' | 'end';
1188+
/**
1189+
* Reason for the failure of the step, if applicable
1190+
*/
1191+
readonly failure_reason?: 'error' | 'abandoned' | 'other';
11801192
[k: string]: unknown;
11811193
};
11821194
/**

schemas/rum/vital-schema.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"type": {
2929
"type": "string",
3030
"description": "Type of the vital",
31-
"enum": ["duration"],
31+
"enum": ["duration", "step"],
3232
"readOnly": true
3333
},
3434
"id": {
@@ -37,6 +37,12 @@
3737
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
3838
"readOnly": true
3939
},
40+
"parent_id": {
41+
"type": "string",
42+
"description": "UUID for linking the step vital to the parent event, if applicable",
43+
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
44+
"readOnly": true
45+
},
4046
"name": {
4147
"type": "string",
4248
"description": "Name of the vital, as it is also used as facet path for its value, it must contain only letters, digits, or the characters - _ . @ $",
@@ -61,6 +67,18 @@
6167
"readOnly": true
6268
},
6369
"readOnly": true
70+
},
71+
"step_type": {
72+
"type": "string",
73+
"description": "Type of the step that triggered the vital, if applicable",
74+
"enum": ["start", "update", "retry", "end"],
75+
"readOnly": true
76+
},
77+
"failure_reason": {
78+
"type": "string",
79+
"description": "Reason for the failure of the step, if applicable",
80+
"enum": ["error", "abandoned", "other"],
81+
"readOnly": true
6482
}
6583
},
6684
"readOnly": true

0 commit comments

Comments
 (0)