Skip to content

Commit d658bdf

Browse files
authored
Merge pull request #1383 from DataDog/jward/schema-update
Update RUM Event Schema
2 parents ca81ad7 + 82f1dc4 commit d658bdf

3 files changed

Lines changed: 35 additions & 11 deletions

File tree

dd-sdk-android/apiSurface

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ data class com.datadog.android.rum.model.ActionEvent
668668
fun fromJson(kotlin.String): Application
669669
fun fromJsonObject(com.google.gson.JsonObject): Application
670670
data class ActionEventSession
671-
constructor(kotlin.String, ActionEventSessionType, kotlin.Boolean? = null, kotlin.Boolean? = true)
671+
constructor(kotlin.String, ActionEventSessionType, kotlin.Boolean? = null)
672672
fun toJson(): com.google.gson.JsonElement
673673
companion object
674674
fun fromJson(kotlin.String): ActionEventSession
@@ -908,7 +908,7 @@ data class com.datadog.android.rum.model.ErrorEvent
908908
fun fromJson(kotlin.String): Application
909909
fun fromJsonObject(com.google.gson.JsonObject): Application
910910
data class ErrorEventSession
911-
constructor(kotlin.String, ErrorEventSessionType, kotlin.Boolean? = null, kotlin.Boolean? = true)
911+
constructor(kotlin.String, ErrorEventSessionType, kotlin.Boolean? = null)
912912
fun toJson(): com.google.gson.JsonElement
913913
companion object
914914
fun fromJson(kotlin.String): ErrorEventSession
@@ -1157,7 +1157,7 @@ data class com.datadog.android.rum.model.LongTaskEvent
11571157
fun fromJson(kotlin.String): Application
11581158
fun fromJsonObject(com.google.gson.JsonObject): Application
11591159
data class LongTaskEventSession
1160-
constructor(kotlin.String, LongTaskEventSessionType, kotlin.Boolean? = null, kotlin.Boolean? = true)
1160+
constructor(kotlin.String, LongTaskEventSessionType, kotlin.Boolean? = null)
11611161
fun toJson(): com.google.gson.JsonElement
11621162
companion object
11631163
fun fromJson(kotlin.String): LongTaskEventSession
@@ -1327,7 +1327,7 @@ data class com.datadog.android.rum.model.ResourceEvent
13271327
fun fromJson(kotlin.String): Application
13281328
fun fromJsonObject(com.google.gson.JsonObject): Application
13291329
data class ResourceEventSession
1330-
constructor(kotlin.String, ResourceEventSessionType, kotlin.Boolean? = null, kotlin.Boolean? = true)
1330+
constructor(kotlin.String, ResourceEventSessionType, kotlin.Boolean? = null)
13311331
fun toJson(): com.google.gson.JsonElement
13321332
companion object
13331333
fun fromJson(kotlin.String): ResourceEventSession
@@ -1591,7 +1591,7 @@ data class com.datadog.android.rum.model.ViewEvent
15911591
fun fromJson(kotlin.String): Application
15921592
fun fromJsonObject(com.google.gson.JsonObject): Application
15931593
data class ViewEventSession
1594-
constructor(kotlin.String, ViewEventSessionType, kotlin.Boolean? = null, kotlin.Boolean? = true)
1594+
constructor(kotlin.String, ViewEventSessionType, kotlin.Boolean? = null, StartReason? = null, kotlin.Boolean? = true)
15951595
fun toJson(): com.google.gson.JsonElement
15961596
companion object
15971597
fun fromJson(kotlin.String): ViewEventSession
@@ -1754,6 +1754,16 @@ data class com.datadog.android.rum.model.ViewEvent
17541754
fun toJson(): com.google.gson.JsonElement
17551755
companion object
17561756
fun fromJson(kotlin.String): ViewEventSessionType
1757+
enum StartReason
1758+
constructor(kotlin.String)
1759+
- APP_START
1760+
- INACTIVITY_TIMEOUT
1761+
- MAX_DURATION
1762+
- STOP_API
1763+
- BACKGROUND_EVENT
1764+
fun toJson(): com.google.gson.JsonElement
1765+
companion object
1766+
fun fromJson(kotlin.String): StartReason
17571767
enum LoadingType
17581768
constructor(kotlin.String)
17591769
- INITIAL_LOAD

dd-sdk-android/src/main/json/rum/_common-schema.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@
5757
"type": "boolean",
5858
"description": "Whether this session has a replay",
5959
"readOnly": true
60-
},
61-
"is_active": {
62-
"type": "boolean",
63-
"description": "Whether this session is currently active. Set to false to manually stop a session",
64-
"default": true,
65-
"readOnly": true
6660
}
6761
},
6862
"readOnly": true

dd-sdk-android/src/main/json/rum/view-schema.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,26 @@
297297
},
298298
"readOnly": true
299299
},
300+
"session": {
301+
"type": "object",
302+
"description": "Session properties",
303+
"required": [],
304+
"properties": {
305+
"start_reason": {
306+
"type": "string",
307+
"description": "The precondition that led to the creation of the session",
308+
"enum": ["app_start", "inactivity_timeout", "max_duration", "stop_api", "background_event"],
309+
"readOnly": true
310+
},
311+
"is_active": {
312+
"type": "boolean",
313+
"description": "Whether this session is currently active. Set to false to manually stop a session",
314+
"default": true,
315+
"readOnly": true
316+
}
317+
},
318+
"readOnly": true
319+
},
300320
"feature_flags": {
301321
"type": "object",
302322
"description": "Feature flags properties",

0 commit comments

Comments
 (0)