Skip to content

Commit 6a3a093

Browse files
Update RUM schema
1 parent fa9de09 commit 6a3a093

File tree

28 files changed

+3315
-2540
lines changed

28 files changed

+3315
-2540
lines changed

detekt_custom_safe_calls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,8 @@ datadog:
846846
- "kotlin.collections.listOf(com.datadog.android.rum.model.ErrorEvent.Interface)"
847847
- "kotlin.collections.listOf(com.datadog.android.rum.model.LongTaskEvent.Interface)"
848848
- "kotlin.collections.listOf(com.datadog.android.rum.model.ResourceEvent.Interface)"
849+
- "kotlin.collections.listOf(com.datadog.android.rum.model.RumVitalOperationStepEvent.Interface)"
849850
- "kotlin.collections.listOf(com.datadog.android.rum.model.ViewEvent.Interface)"
850-
- "kotlin.collections.listOf(com.datadog.android.rum.model.VitalEvent.Interface)"
851851
- "kotlin.collections.listOf(com.datadog.android.sessionreplay.MapperTypeWrapper)"
852852
- "kotlin.collections.listOf(com.datadog.android.sessionreplay.internal.recorder.DefaultOptionSelectorDetector)"
853853
- "kotlin.collections.listOf(com.datadog.android.sessionreplay.material.internal.MaterialDrawableToColorMapper)"

features/dd-sdk-android-rum/api/apiSurface

Lines changed: 484 additions & 320 deletions
Large diffs are not rendered by default.

features/dd-sdk-android-rum/api/dd-sdk-android-rum.api

Lines changed: 2415 additions & 1842 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,50 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "rum/_vital-common-schema.json",
4-
"title": "VitalCommonProperties",
4+
"title": "RumVitalEventCommonProperties",
55
"type": "object",
66
"description": "Schema of common properties for a Vital event",
77
"allOf": [
88
{
9-
"description": "Vital properties",
10-
"required": ["id", "type"],
9+
"$ref": "_common-schema.json"
10+
},
11+
{
12+
"$ref": "_view-container-schema.json"
13+
},
14+
{
15+
"required": ["type", "vital"],
1116
"properties": {
12-
"id": {
13-
"type": "string",
14-
"description": "UUID of the vital",
15-
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
16-
"readOnly": true
17-
},
18-
"name": {
17+
"type": {
1918
"type": "string",
20-
"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 - _ . @ $",
19+
"description": "RUM event type",
20+
"const": "vital",
2121
"readOnly": true
2222
},
23-
"description": {
24-
"type": "string",
25-
"description": "Description of the vital. It can be used as a secondary identifier (URL, React component name...)",
23+
"vital": {
24+
"type": "object",
25+
"description": "Vital properties",
26+
"required": ["id"],
27+
"properties": {
28+
"id": {
29+
"type": "string",
30+
"description": "UUID of the vital",
31+
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
32+
"readOnly": true
33+
},
34+
"name": {
35+
"type": "string",
36+
"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 - _ . @ $",
37+
"readOnly": true
38+
},
39+
"description": {
40+
"type": "string",
41+
"description": "Description of the vital. It can be used as a secondary identifier (URL, React component name...)",
42+
"readOnly": true
43+
}
44+
},
2645
"readOnly": true
2746
}
28-
},
29-
"readOnly": true
47+
}
3048
}
3149
]
3250
}

features/dd-sdk-android-rum/src/main/json/rum/long_task-schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"const": "long_task",
2525
"readOnly": true
2626
},
27+
"view": {
28+
"type": "object"
29+
},
2730
"long_task": {
2831
"type": "object",
2932
"description": "Long Task properties",

features/dd-sdk-android-rum/src/main/json/rum/resource-schema.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"const": "resource",
2424
"readOnly": true
2525
},
26+
"view": {
27+
"type": "object"
28+
},
2629
"resource": {
2730
"type": "object",
2831
"description": "Resource properties",
@@ -307,6 +310,75 @@
307310
"type": "string",
308311
"description": "String representation of the operation variables",
309312
"readOnly": false
313+
},
314+
"error_count": {
315+
"type": "integer",
316+
"description": "Number of GraphQL errors in the response",
317+
"minimum": 0,
318+
"readOnly": true
319+
},
320+
"errors": {
321+
"type": "array",
322+
"description": "Array of GraphQL errors from the response",
323+
"items": {
324+
"type": "object",
325+
"description": "GraphQL error details",
326+
"required": ["message"],
327+
"properties": {
328+
"message": {
329+
"type": "string",
330+
"description": "Error message",
331+
"readOnly": true
332+
},
333+
"code": {
334+
"type": "string",
335+
"description": "Error code (used by some providers)",
336+
"readOnly": true
337+
},
338+
"locations": {
339+
"type": "array",
340+
"description": "Array of error locations in the GraphQL query",
341+
"items": {
342+
"type": "object",
343+
"description": "Error location",
344+
"required": ["line", "column"],
345+
"properties": {
346+
"line": {
347+
"type": "integer",
348+
"description": "Line number where the error occurred",
349+
"minimum": 1,
350+
"readOnly": true
351+
},
352+
"column": {
353+
"type": "integer",
354+
"description": "Column number where the error occurred",
355+
"minimum": 1,
356+
"readOnly": true
357+
}
358+
},
359+
"readOnly": true
360+
},
361+
"readOnly": true
362+
},
363+
"path": {
364+
"type": "array",
365+
"description": "Path to the field that caused the error",
366+
"items": {
367+
"oneOf": [
368+
{
369+
"type": "string"
370+
},
371+
{
372+
"type": "integer"
373+
}
374+
]
375+
},
376+
"readOnly": true
377+
}
378+
},
379+
"readOnly": true
380+
},
381+
"readOnly": true
310382
}
311383
},
312384
"readOnly": true
Lines changed: 53 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,71 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "rum/vital-app-launch-schema.json",
4-
"title": "AppLaunchProperties",
4+
"title": "RumVitalAppLaunchEvent",
55
"type": "object",
66
"description": "Schema for app launch metrics.",
77
"allOf": [
88
{
99
"$ref": "_vital-common-schema.json"
1010
},
1111
{
12-
"required": ["type", "app_launch_metric", "duration"],
12+
"required": ["vital"],
1313
"properties": {
14-
"type": {
15-
"type": "string",
16-
"description": "Type of the vital.",
17-
"const": "app_launch",
14+
"vital": {
15+
"type": "object",
16+
"description": "Vital properties",
17+
"required": ["type", "app_launch_metric", "duration"],
18+
"properties": {
19+
"type": {
20+
"type": "string",
21+
"description": "Type of the vital.",
22+
"const": "app_launch",
23+
"readOnly": true
24+
},
25+
"app_launch_metric": {
26+
"type": "string",
27+
"description": "The metric of the app launch.",
28+
"enum": ["ttid", "ttfd"],
29+
"readOnly": true
30+
},
31+
"duration": {
32+
"type": "number",
33+
"description": "Duration of the vital in nanoseconds.",
34+
"readOnly": true
35+
},
36+
"startup_type": {
37+
"type": "string",
38+
"description": "The type of the app launch.",
39+
"enum": ["cold_start", "warm_start"],
40+
"readOnly": true
41+
},
42+
"is_prewarmed": {
43+
"type": "boolean",
44+
"description": "Whether the app launch was prewarmed.",
45+
"readOnly": true
46+
},
47+
"has_saved_instance_state_bundle": {
48+
"type": "boolean",
49+
"description": "If the app launch had a saved instance state bundle.",
50+
"readOnly": true
51+
}
52+
},
1853
"readOnly": true
1954
},
20-
"app_launch_metric": {
21-
"type": "string",
22-
"description": "The metric of the app launch.",
23-
"enum": ["ttid", "ttfd"],
24-
"readOnly": true
25-
},
26-
"duration": {
27-
"type": "number",
28-
"description": "Duration of the vital in nanoseconds.",
29-
"readOnly": true
30-
},
31-
"startup_type": {
32-
"type": "string",
33-
"description": "The type of the app launch.",
34-
"enum": ["cold_start", "warm_start"],
35-
"readOnly": true
36-
},
37-
"is_prewarmed": {
38-
"type": "boolean",
39-
"description": "Whether the app launch was prewarmed.",
40-
"readOnly": true
41-
},
42-
"has_saved_instance_state_bundle": {
43-
"type": "boolean",
44-
"description": "If the app launch had a saved instance state bundle.",
55+
56+
"_dd": {
57+
"type": "object",
58+
"description": "Internal properties",
59+
"properties": {
60+
"profiling": {
61+
"type": "object",
62+
"description": "Profiling context",
63+
"allOf": [{ "$ref": "./_profiling-internal-context-schema.json" }]
64+
}
65+
},
4566
"readOnly": true
4667
}
47-
},
48-
"readOnly": true
68+
}
4969
}
5070
]
5171
}

features/dd-sdk-android-rum/src/main/json/rum/vital-duration-schema.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

features/dd-sdk-android-rum/src/main/json/rum/vital-feature-operation-schema.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)