Skip to content

Commit 7ad316d

Browse files
committed
Add overwrite property, event samples, and regenerate types
- Add `overwrite` boolean to AddViewLoadingTime schema to capture customer intent (whether overwrite API option was used) - Add browser and mobile sample events for AddViewLoadingTime usage - Regenerate TypeScript types
1 parent be67b90 commit 7ad316d

5 files changed

Lines changed: 114 additions & 39 deletions

File tree

lib/cjs/generated/telemetry.d.ts

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,29 @@ export interface GraphQLRequest {
832832
feature: 'graphql-request';
833833
[k: string]: unknown;
834834
}
835+
export interface AddViewLoadingTime {
836+
/**
837+
* addViewLoadingTime API
838+
*/
839+
feature: 'addViewLoadingTime';
840+
/**
841+
* Whether the overwrite API option was used
842+
*/
843+
overwrite: boolean;
844+
/**
845+
* Whether the view is not available
846+
*/
847+
no_view?: boolean;
848+
/**
849+
* Whether the available view is not active
850+
*/
851+
no_active_view?: boolean;
852+
/**
853+
* Whether the loading time was overwritten
854+
*/
855+
overwritten: boolean;
856+
[k: string]: unknown;
857+
}
835858
export interface StartSessionReplayRecording {
836859
/**
837860
* startSessionReplayRecording API
@@ -892,25 +915,6 @@ export interface StopResource {
892915
feature: 'stop-resource';
893916
[k: string]: unknown;
894917
}
895-
export interface AddViewLoadingTime {
896-
/**
897-
* addViewLoadingTime API
898-
*/
899-
feature: 'addViewLoadingTime';
900-
/**
901-
* Whether the view is not available
902-
*/
903-
no_view?: boolean;
904-
/**
905-
* Whether the available view is not active
906-
*/
907-
no_active_view?: boolean;
908-
/**
909-
* Whether the loading time was overwritten
910-
*/
911-
overwritten: boolean;
912-
[k: string]: unknown;
913-
}
914918
export interface TrackWebView {
915919
/**
916920
* trackWebView API

lib/esm/generated/telemetry.d.ts

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,29 @@ export interface GraphQLRequest {
832832
feature: 'graphql-request';
833833
[k: string]: unknown;
834834
}
835+
export interface AddViewLoadingTime {
836+
/**
837+
* addViewLoadingTime API
838+
*/
839+
feature: 'addViewLoadingTime';
840+
/**
841+
* Whether the overwrite API option was used
842+
*/
843+
overwrite: boolean;
844+
/**
845+
* Whether the view is not available
846+
*/
847+
no_view?: boolean;
848+
/**
849+
* Whether the available view is not active
850+
*/
851+
no_active_view?: boolean;
852+
/**
853+
* Whether the loading time was overwritten
854+
*/
855+
overwritten: boolean;
856+
[k: string]: unknown;
857+
}
835858
export interface StartSessionReplayRecording {
836859
/**
837860
* startSessionReplayRecording API
@@ -892,25 +915,6 @@ export interface StopResource {
892915
feature: 'stop-resource';
893916
[k: string]: unknown;
894917
}
895-
export interface AddViewLoadingTime {
896-
/**
897-
* addViewLoadingTime API
898-
*/
899-
feature: 'addViewLoadingTime';
900-
/**
901-
* Whether the view is not available
902-
*/
903-
no_view?: boolean;
904-
/**
905-
* Whether the available view is not active
906-
*/
907-
no_active_view?: boolean;
908-
/**
909-
* Whether the loading time was overwritten
910-
*/
911-
overwritten: boolean;
912-
[k: string]: unknown;
913-
}
914918
export interface TrackWebView {
915919
/**
916920
* trackWebView API
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"_dd": {
3+
"format_version": 2
4+
},
5+
"type": "telemetry",
6+
"date": 1591284175342,
7+
"service": "browser-sdk",
8+
"source": "browser",
9+
"version": "1.2.3",
10+
"application": {
11+
"id": "ac8218cf-498b-4d33-bd44-151095959547"
12+
},
13+
"session": {
14+
"id": "cacbf45c-3a05-48ce-b066-d76349460599"
15+
},
16+
"view": {
17+
"id": "623d50fd-75cf-4025-97d2-e51ff94171f6"
18+
},
19+
"action": {
20+
"id": "ae3a5d82-cdd1-468d-9bc9-3aa9e54d953c"
21+
},
22+
"experimental_features": [],
23+
"telemetry": {
24+
"type": "usage",
25+
"usage": {
26+
"feature": "addViewLoadingTime",
27+
"overwrite": true,
28+
"overwritten": true
29+
}
30+
}
31+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"_dd": {
3+
"format_version": 2
4+
},
5+
"type": "telemetry",
6+
"date": 1591284175342,
7+
"service": "mobile-sdk",
8+
"source": "ios",
9+
"version": "1.2.3",
10+
"application": {
11+
"id": "ac8218cf-498b-4d33-bd44-151095959547"
12+
},
13+
"session": {
14+
"id": "cacbf45c-3a05-48ce-b066-d76349460599"
15+
},
16+
"view": {
17+
"id": "623d50fd-75cf-4025-97d2-e51ff94171f6"
18+
},
19+
"action": {
20+
"id": "ae3a5d82-cdd1-468d-9bc9-3aa9e54d953c"
21+
},
22+
"experimental_features": [],
23+
"telemetry": {
24+
"type": "usage",
25+
"usage": {
26+
"feature": "addViewLoadingTime",
27+
"overwrite": false,
28+
"no_view": true,
29+
"overwritten": false
30+
}
31+
}
32+
}

schemas/telemetry/usage/common-features-schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,18 @@
313313
}
314314
},
315315
{
316-
"required": ["feature", "overwritten"],
316+
"required": ["feature", "overwrite", "overwritten"],
317317
"title": "AddViewLoadingTime",
318318
"properties": {
319319
"feature": {
320320
"type": "string",
321321
"description": "addViewLoadingTime API",
322322
"const": "addViewLoadingTime"
323323
},
324+
"overwrite": {
325+
"type": "boolean",
326+
"description": "Whether the overwrite API option was used"
327+
},
324328
"no_view": {
325329
"type": "boolean",
326330
"description": "Whether the view is not available"

0 commit comments

Comments
 (0)