Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update telemetry schema #1145

Merged
merged 1 commit into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dd-sdk-android/apiSurface
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ data class com.datadog.android.telemetry.model.TelemetryConfigurationEvent
companion object
fun fromJson(kotlin.String): Telemetry
data class Configuration
constructor(kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.collections.List<kotlin.String>? = null, kotlin.collections.List<kotlin.String>? = null, kotlin.Boolean? = null, ViewTrackingStrategy? = null, kotlin.Boolean? = null, kotlin.Long? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.Long? = null, kotlin.Long? = null)
constructor(kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.collections.List<kotlin.String>? = null, kotlin.collections.List<kotlin.String>? = null, kotlin.Boolean? = null, ViewTrackingStrategy? = null, kotlin.Boolean? = null, kotlin.Long? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.Long? = null, kotlin.Long? = null)
fun toJson(): com.google.gson.JsonElement
companion object
fun fromJson(kotlin.String): Configuration
Expand Down
66 changes: 40 additions & 26 deletions dd-sdk-android/src/main/json/telemetry/configuration-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@
"$ref": "_common-schema.json"
},
{
"required": [
"telemetry"
],
"required": ["telemetry"],
"properties": {
"telemetry": {
"type": "object",
"description": "The telemetry configuration information",
"required": [
"type",
"configuration"
],
"required": ["type", "configuration"],
"properties": {
"type": {
"type": "string",
Expand Down Expand Up @@ -70,11 +65,13 @@
"type": "integer",
"description": "The percentage of sessions with Browser RUM & Session Replay pricing tracked",
"minimum": 0,
"maximum": 100
"maximum": 100,
"readOnly": false
},
"use_proxy": {
"type": "boolean",
"description": "Whether a proxy configured is used"
"description": "Whether a proxy configured is used",
"readOnly": false
},
"use_before_send": {
"type": "boolean",
Expand All @@ -88,6 +85,14 @@
"type": "boolean",
"description": "Whether sessions across subdomains for the same site are tracked"
},
"track_resources": {
"type": "boolean",
"description": "Whether resources are tracked"
},
"track_long_task": {
"type": "boolean",
"description": "Whether long tasks are tracked"
},
"use_cross_site_session_cookie": {
"type": "boolean",
"description": "Whether a secure cross-site session cookie is used"
Expand All @@ -106,7 +111,8 @@
},
"default_privacy_level": {
"type": "string",
"description": "Session replay default privacy level"
"description": "Session replay default privacy level",
"readOnly": false
},
"use_excluded_activity_urls": {
"type": "boolean",
Expand All @@ -118,11 +124,13 @@
},
"track_views_manually": {
"type": "boolean",
"description": "Whether the RUM views creation is handled manually"
"description": "Whether the RUM views creation is handled manually",
"readOnly": false
},
"track_interactions": {
"type": "boolean",
"description": "Whether user actions are tracked"
"description": "Whether user actions are tracked",
"readOnly": false
},
"forward_errors_to_logs": {
"type": "boolean",
Expand Down Expand Up @@ -174,55 +182,61 @@
},
"track_background_events": {
"type": "boolean",
"description": "Whether RUM events are tracked when the application is in Background"
"description": "Whether RUM events are tracked when the application is in Background",
"readOnly": false
},
"mobile_vitals_update_period": {
"type": "integer",
"description": "The period between each Mobile Vital sample (in milliseconds)"
"description": "The period between each Mobile Vital sample (in milliseconds)",
"readOnly": false
},
"track_errors": {
"type": "boolean",
"description": "Whether error monitoring & crash reporting is enabled for the source platform"
"description": "Whether error monitoring & crash reporting is enabled for the source platform",
"readOnly": false
},
"track_network_requests": {
"type": "boolean",
"description": "Whether automatic collection of network requests is enabled"
"description": "Whether automatic collection of network requests is enabled",
"readOnly": false
},
"use_tracing": {
"type": "boolean",
"description": "Whether tracing features are enabled"
},
"track_native_views": {
"type": "boolean",
"description": "Whether native views are tracked (for cross platform SDKs)"
"description": "Whether native views are tracked (for cross platform SDKs)",
"readOnly": false
},
"track_native_errors": {
"type": "boolean",
"description": "Whether native error monitoring & crash reporting is enabled (for cross platform SDKs)"
"description": "Whether native error monitoring & crash reporting is enabled (for cross platform SDKs)",
"readOnly": false
},
"track_native_long_tasks": {
"type": "boolean",
"description": "Whether long task tracking is performed automatically"
"description": "Whether long task tracking is performed automatically",
"readOnly": false
},
"track_cross_platform_long_tasks": {
"type": "boolean",
"description": "Whether long task tracking is performed automatically for cross platform SDKs"
},
"use_attach_to_existing": {
"type": "boolean",
"description": "Whether the cross-platform SDK was initialized on top of a pre-existing native SDK instance"
"description": "Whether long task tracking is performed automatically for cross platform SDKs",
"readOnly": false
},
"use_first_party_hosts": {
"type": "boolean",
"description": "Whether the client has provided a list of first party hosts"
"description": "Whether the client has provided a list of first party hosts",
"readOnly": false
},
"initialization_type": {
"type": "string",
"description": "The type of initialization the SDK used, in case multiple are supported"
},
"track_flutter_performance": {
"type": "boolean",
"description": "Whether Flutter build and raster time tracking is enabled"
"description": "Whether Flutter build and raster time tracking is enabled",
"readOnly": false
},
"batch_size": {
"type": "integer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ internal class ConfigurationBuilderTest {
val builder = testedBuilder
_InternalProxy.setTelemetryConfigurationEventMapper(builder, eventMapper)
val config = builder.build()

// Then
assertThat(config.coreConfig).isEqualTo(Configuration.DEFAULT_CORE_CONFIG)
assertThat(config.logsConfig).isEqualTo(Configuration.DEFAULT_LOGS_CONFIG)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,6 @@ internal class RumEventSerializerTest {
configuration.trackCrossPlatformLongTasks!!
)
}
if (configuration.useAttachToExisting != null) {
hasField("use_attach_to_existing", configuration.useAttachToExisting!!)
}
if (configuration.useFirstPartyHosts != null) {
hasField("use_first_party_hosts", configuration.useFirstPartyHosts!!)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ internal class TelemetryConfigurationEventForgeryFactory :
forge.aNullable { aBool() },
forge.aNullable { aBool() },
forge.aNullable { aBool() },
forge.aNullable { aBool() },
forge.aNullable { aBool() },
forge.aNullable { aString() },
forge.aNullable { aBool() },
forge.aNullable { aString() },
Expand All @@ -79,7 +81,6 @@ internal class TelemetryConfigurationEventForgeryFactory :
forge.aNullable { aBool() },
forge.aNullable { aBool() },
forge.aNullable { aBool() },
forge.aNullable { aBool() },
forge.aNullable { aString() },
forge.aNullable { aBool() },
forge.aNullable { aLong() },
Expand Down