diff --git a/features/dd-sdk-android-rum/api/apiSurface b/features/dd-sdk-android-rum/api/apiSurface index 9dc1d5da82..9ffd81ea8e 100644 --- a/features/dd-sdk-android-rum/api/apiSurface +++ b/features/dd-sdk-android-rum/api/apiSurface @@ -1782,7 +1782,7 @@ data class com.datadog.android.telemetry.model.TelemetryConfigurationEvent fun fromJson(kotlin.String): Telemetry fun fromJsonObject(com.google.gson.JsonObject): 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.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.collections.List? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.collections.List? = null, kotlin.collections.List? = 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, kotlin.Long? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.String? = null, kotlin.String? = null, kotlin.String? = 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.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.collections.List? = null, kotlin.String? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, kotlin.collections.List? = null, kotlin.collections.List? = 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, kotlin.Long? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.String? = null, kotlin.String? = null, kotlin.String? = null, kotlin.Long? = null, kotlin.Boolean? = null, kotlin.String? = null, kotlin.String? = null) fun toJson(): com.google.gson.JsonElement companion object fun fromJson(kotlin.String): Configuration diff --git a/features/dd-sdk-android-rum/api/dd-sdk-android-rum.api b/features/dd-sdk-android-rum/api/dd-sdk-android-rum.api index a11df09844..347f4c89a4 100644 --- a/features/dd-sdk-android-rum/api/dd-sdk-android-rum.api +++ b/features/dd-sdk-android-rum/api/dd-sdk-android-rum.api @@ -1,3 +1,11 @@ +public final class com/datadog/android/rum/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public static final field OPENTELEMETRY_API_VERSION_NAME Ljava/lang/String; + public fun ()V +} + public final class com/datadog/android/rum/CloseableExtKt { public static final fun useMonitored (Ljava/io/Closeable;Lcom/datadog/android/api/SdkCore;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static synthetic fun useMonitored$default (Ljava/io/Closeable;Lcom/datadog/android/api/SdkCore;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object; @@ -5341,8 +5349,8 @@ public final class com/datadog/android/telemetry/model/TelemetryConfigurationEve public final class com/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration { public static final field Companion Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration$Companion; public fun ()V - public fun (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/util/List;Ljava/lang/Boolean;Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$ViewTrackingStrategy;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/util/List;Ljava/lang/Boolean;Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$ViewTrackingStrategy;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/util/List;Ljava/lang/Boolean;Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$ViewTrackingStrategy;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/util/List;Ljava/lang/Boolean;Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$ViewTrackingStrategy;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/Long; public final fun component10 ()Ljava/lang/Boolean; public final fun component11 ()Ljava/lang/Boolean; @@ -5394,18 +5402,23 @@ public final class com/datadog/android/telemetry/model/TelemetryConfigurationEve public final fun component53 ()Ljava/lang/String; public final fun component54 ()Ljava/lang/String; public final fun component55 ()Ljava/lang/String; + public final fun component56 ()Ljava/lang/Long; + public final fun component57 ()Ljava/lang/Boolean; + public final fun component58 ()Ljava/lang/String; + public final fun component59 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/Long; public final fun component7 ()Ljava/lang/Long; public final fun component8 ()Ljava/lang/Boolean; public final fun component9 ()Ljava/lang/Boolean; - public final fun copy (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/util/List;Ljava/lang/Boolean;Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$ViewTrackingStrategy;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration; - public static synthetic fun copy$default (Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/util/List;Ljava/lang/Boolean;Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$ViewTrackingStrategy;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/Object;)Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration; + public final fun copy (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/util/List;Ljava/lang/Boolean;Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$ViewTrackingStrategy;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;)Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration; + public static synthetic fun copy$default (Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Ljava/util/List;Ljava/lang/Boolean;Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$ViewTrackingStrategy;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;IILjava/lang/Object;)Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration; public fun equals (Ljava/lang/Object;)Z public static final fun fromJson (Ljava/lang/String;)Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration; public static final fun fromJsonObject (Lcom/google/gson/JsonObject;)Lcom/datadog/android/telemetry/model/TelemetryConfigurationEvent$Configuration; public final fun getActionNameAttribute ()Ljava/lang/String; public final fun getAllowFallbackToLocalStorage ()Ljava/lang/Boolean; public final fun getAllowUntrustedEvents ()Ljava/lang/Boolean; + public final fun getAppHangThreshold ()Ljava/lang/Long; public final fun getBackgroundTasksEnabled ()Ljava/lang/Boolean; public final fun getBatchProcessingLevel ()Ljava/lang/Long; public final fun getBatchSize ()Ljava/lang/Long; @@ -5430,6 +5443,8 @@ public final class com/datadog/android/telemetry/model/TelemetryConfigurationEve public final fun getTelemetryConfigurationSampleRate ()Ljava/lang/Long; public final fun getTelemetrySampleRate ()Ljava/lang/Long; public final fun getTraceSampleRate ()Ljava/lang/Long; + public final fun getTracerApi ()Ljava/lang/String; + public final fun getTracerApiVersion ()Ljava/lang/String; public final fun getTrackBackgroundEvents ()Ljava/lang/Boolean; public final fun getTrackCrossPlatformLongTasks ()Ljava/lang/Boolean; public final fun getTrackErrors ()Ljava/lang/Boolean; @@ -5453,6 +5468,7 @@ public final class com/datadog/android/telemetry/model/TelemetryConfigurationEve public final fun getUseExcludedActivityUrls ()Ljava/lang/Boolean; public final fun getUseFirstPartyHosts ()Ljava/lang/Boolean; public final fun getUseLocalEncryption ()Ljava/lang/Boolean; + public final fun getUsePciIntake ()Ljava/lang/Boolean; public final fun getUseProxy ()Ljava/lang/Boolean; public final fun getUseSecureSessionCookie ()Ljava/lang/Boolean; public final fun getUseTracing ()Ljava/lang/Boolean; @@ -5467,6 +5483,8 @@ public final class com/datadog/android/telemetry/model/TelemetryConfigurationEve public final fun setReactVersion (Ljava/lang/String;)V public final fun setSessionReplaySampleRate (Ljava/lang/Long;)V public final fun setStartSessionReplayRecordingManually (Ljava/lang/Boolean;)V + public final fun setTracerApi (Ljava/lang/String;)V + public final fun setTracerApiVersion (Ljava/lang/String;)V public final fun setTrackBackgroundEvents (Ljava/lang/Boolean;)V public final fun setTrackCrossPlatformLongTasks (Ljava/lang/Boolean;)V public final fun setTrackErrors (Ljava/lang/Boolean;)V @@ -5483,6 +5501,7 @@ public final class com/datadog/android/telemetry/model/TelemetryConfigurationEve public final fun setTrackViewsManually (Ljava/lang/Boolean;)V public final fun setUnityVersion (Ljava/lang/String;)V public final fun setUseFirstPartyHosts (Ljava/lang/Boolean;)V + public final fun setUsePciIntake (Ljava/lang/Boolean;)V public final fun setUseProxy (Ljava/lang/Boolean;)V public final fun toJson ()Lcom/google/gson/JsonElement; public fun toString ()Ljava/lang/String; diff --git a/features/dd-sdk-android-rum/build.gradle.kts b/features/dd-sdk-android-rum/build.gradle.kts index 8124c20213..7a66e2db3a 100644 --- a/features/dd-sdk-android-rum/build.gradle.kts +++ b/features/dd-sdk-android-rum/build.gradle.kts @@ -40,6 +40,14 @@ plugins { android { defaultConfig { + buildFeatures { + buildConfig = true + } + buildConfigField( + "String", + "OPENTELEMETRY_API_VERSION_NAME", + "\"${libs.versions.openTelemetry.get()}\"" + ) consumerProguardFiles(Paths.get(rootDir.path, "consumer-rules.pro").toString()) } @@ -80,6 +88,7 @@ dependencies { testImplementation(libs.okHttp) testImplementation(libs.okHttpMock) testImplementation(libs.bundles.openTracing) + testImplementation(libs.openTelemetryApi) unmock(libs.robolectric) } diff --git a/features/dd-sdk-android-rum/src/main/json/telemetry/configuration-schema.json b/features/dd-sdk-android-rum/src/main/json/telemetry/configuration-schema.json index 07153bc8db..a8c6cce4e0 100644 --- a/features/dd-sdk-android-rum/src/main/json/telemetry/configuration-schema.json +++ b/features/dd-sdk-android-rum/src/main/json/telemetry/configuration-schema.json @@ -315,6 +315,25 @@ "type": "string", "description": "The version of Unity used in a Unity application", "readOnly": false + }, + "app_hang_threshold": { + "type": "integer", + "description": "The threshold used for iOS App Hangs monitoring (in milliseconds)" + }, + "use_pci_intake": { + "type": "boolean", + "description": "Whether logs are sent to the PCI-compliant intake", + "readOnly": false + }, + "tracer_api": { + "type": "string", + "description": "The tracer API used by the SDK. Possible values: 'Datadog', 'OpenTelemetry', 'OpenTracing'", + "readOnly": false + }, + "tracer_api_version": { + "type": "string", + "description": "The version of the tracer API used by the SDK. Eg. '0.1.0'", + "readOnly": false } } } diff --git a/features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/telemetry/internal/TelemetryEventHandler.kt b/features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/telemetry/internal/TelemetryEventHandler.kt index dc7f89ce59..701fb1c8c2 100644 --- a/features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/telemetry/internal/TelemetryEventHandler.kt +++ b/features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/telemetry/internal/TelemetryEventHandler.kt @@ -14,6 +14,7 @@ import com.datadog.android.api.feature.FeatureSdkCore import com.datadog.android.api.storage.DataWriter import com.datadog.android.core.sampling.RateBasedSampler import com.datadog.android.core.sampling.Sampler +import com.datadog.android.rum.BuildConfig import com.datadog.android.rum.RumSessionListener import com.datadog.android.rum.internal.RumFeature import com.datadog.android.rum.internal.domain.RumContext @@ -228,7 +229,9 @@ internal class TelemetryEventHandler( } val rumContext = datadogContext.rumContext() - + val tracerApi = resolveTracerApi(sdkCore) + val openTelemetryApiVersion = resolveOpenTelemetryApiVersion(tracerApi) + val useTracing = (traceFeature != null && tracerApi != null) return TelemetryConfigurationEvent( dd = TelemetryConfigurationEvent.Dd(), date = timestamp, @@ -258,7 +261,9 @@ internal class TelemetryEventHandler( batchSize = coreConfiguration.batchSize, batchUploadFrequency = coreConfiguration.batchUploadFrequency, mobileVitalsUpdatePeriod = rumConfig?.vitalsMonitorUpdateFrequency?.periodInMs, - useTracing = traceFeature != null && isGlobalTracerRegistered(), + useTracing = useTracing, + tracerApi = tracerApi?.name, + tracerApiVersion = openTelemetryApiVersion, trackNetworkRequests = trackNetworkRequests, sessionReplaySampleRate = sessionReplaySampleRate, defaultPrivacyLevel = sessionReplayPrivacy, @@ -299,6 +304,27 @@ internal class TelemetryEventHandler( } } + private fun isOpenTelemetryRegistered(sdkCore: FeatureSdkCore): Boolean { + val traceConfig = sdkCore.getFeatureContext(Feature.TRACING_FEATURE_NAME) + return traceConfig[IS_OPENTELEMETRY_ENABLED_CONFIG_KEY] as? Boolean ?: false + } + + private fun resolveTracerApi(sdkCore: FeatureSdkCore): TracerApi? { + return when { + isOpenTelemetryRegistered(sdkCore) -> TracerApi.OpenTelemetry + isGlobalTracerRegistered() -> TracerApi.OpenTracing + else -> null + } + } + + private fun resolveOpenTelemetryApiVersion(tracerApi: TracerApi?): String? { + return if (tracerApi == TracerApi.OpenTelemetry) { + BuildConfig.OPENTELEMETRY_API_VERSION_NAME + } else { + null + } + } + private fun DatadogContext.rumContext(): RumContext { val rumContext = featuresContext[Feature.RUM_FEATURE_NAME].orEmpty() return RumContext.fromFeatureContext(rumContext) @@ -306,7 +332,13 @@ internal class TelemetryEventHandler( // endregion + internal enum class TracerApi { + OpenTelemetry, + OpenTracing + } + companion object { + internal const val IS_OPENTELEMETRY_ENABLED_CONFIG_KEY = "is_opentelemetry_enabled" const val MAX_EVENTS_PER_SESSION = 100 const val DEFAULT_CONFIGURATION_SAMPLE_RATE = 20f const val ALREADY_SEEN_EVENT_MESSAGE = diff --git a/features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/telemetry/assertj/TelemetryConfigurationEventAssert.kt b/features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/telemetry/assertj/TelemetryConfigurationEventAssert.kt index 36c925f735..1c65d43645 100644 --- a/features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/telemetry/assertj/TelemetryConfigurationEventAssert.kt +++ b/features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/telemetry/assertj/TelemetryConfigurationEventAssert.kt @@ -230,6 +230,26 @@ internal class TelemetryConfigurationEventAssert(actual: TelemetryConfigurationE return this } + fun hasTracerApi(tracerApi: String?): TelemetryConfigurationEventAssert { + assertThat(actual.telemetry.configuration.tracerApi) + .overridingErrorMessage( + "Expected event data to have telemetry.configuration.tracerApi $tracerApi " + + "but was ${actual.telemetry.configuration.tracerApi}" + ) + .isEqualTo(tracerApi) + return this + } + + fun hasTracerApiVersion(tracerApiVersion: String?): TelemetryConfigurationEventAssert { + assertThat(actual.telemetry.configuration.tracerApiVersion) + .overridingErrorMessage( + "Expected event data to have telemetry.configuration.tracerApiVersion $tracerApiVersion " + + "but was ${actual.telemetry.configuration.tracerApiVersion}" + ) + .isEqualTo(tracerApiVersion) + return this + } + fun hasBatchSize(expected: Long?): TelemetryConfigurationEventAssert { assertThat(actual.telemetry.configuration.batchSize) .overridingErrorMessage( diff --git a/features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/telemetry/internal/TelemetryEventHandlerTest.kt b/features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/telemetry/internal/TelemetryEventHandlerTest.kt index 95283f6b74..6c984671e7 100644 --- a/features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/telemetry/internal/TelemetryEventHandlerTest.kt +++ b/features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/telemetry/internal/TelemetryEventHandlerTest.kt @@ -15,6 +15,7 @@ import com.datadog.android.api.storage.DataWriter import com.datadog.android.api.storage.EventBatchWriter import com.datadog.android.core.internal.utils.loggableStackTrace import com.datadog.android.core.sampling.Sampler +import com.datadog.android.rum.BuildConfig import com.datadog.android.rum.internal.RumFeature import com.datadog.android.rum.internal.domain.RumContext import com.datadog.android.rum.internal.domain.scope.RumRawEvent @@ -34,7 +35,6 @@ import com.datadog.tools.unit.forge.aThrowable import com.datadog.tools.unit.forge.exhaustiveAttributes import com.datadog.tools.unit.setStaticValue import fr.xgouchet.elmyr.Forge -import fr.xgouchet.elmyr.annotation.BoolForgery import fr.xgouchet.elmyr.annotation.Forgery import fr.xgouchet.elmyr.junit5.ForgeConfiguration import fr.xgouchet.elmyr.junit5.ForgeExtension @@ -47,6 +47,8 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith import org.junit.jupiter.api.extension.Extensions +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource import org.mockito.Mock import org.mockito.invocation.InvocationOnMock import org.mockito.junit.jupiter.MockitoExtension @@ -353,19 +355,28 @@ internal class TelemetryEventHandlerTest { } } - @Test - fun `𝕄 create config event 𝕎 handleEvent(SendTelemetry) { configuration with tracing settings }`( + @ParameterizedTest + @MethodSource("tracingConfigurationParameters") + fun `𝕄 create config event 𝕎 handleEvent(SendTelemetry) { tracing configuration with tracing settings }`( + configuration: Triple, @Forgery fakeConfiguration: TelemetryCoreConfiguration, - @BoolForgery useTracing: Boolean, forge: Forge ) { // Given - if (useTracing || forge.aBool()) { + val useTracer = configuration.first + val tracerApi = configuration.second + val tracerApiVersion = configuration.third + if (useTracer || forge.aBool()) { whenever(mockSdkCore.getFeature(Feature.TRACING_FEATURE_NAME)) doReturn mock() } val configRawEvent = forge.createRumRawTelemetryConfigurationEvent(fakeConfiguration) - if (useTracing) { - GlobalTracer.registerIfAbsent(mock()) + if (useTracer) { + if (tracerApi == TelemetryEventHandler.TracerApi.OpenTracing) { + GlobalTracer.registerIfAbsent(mock()) + } else if (tracerApi == TelemetryEventHandler.TracerApi.OpenTelemetry) { + whenever(mockSdkCore.getFeatureContext(Feature.TRACING_FEATURE_NAME)) doReturn + mapOf(TelemetryEventHandler.IS_OPENTELEMETRY_ENABLED_CONFIG_KEY to true) + } } // When @@ -376,7 +387,9 @@ internal class TelemetryEventHandlerTest { verify(mockWriter).write(eq(mockEventBatchWriter), capture()) assertConfigEventMatchesRawEvent(firstValue, configRawEvent, fakeRumContext) assertThat(firstValue) - .hasUseTracing(useTracing) + .hasUseTracing(useTracer) + .hasTracerApi(tracerApi?.name) + .hasTracerApiVersion(tracerApiVersion) } } @@ -948,6 +961,22 @@ internal class TelemetryEventHandlerTest { companion object { + @JvmStatic + fun tracingConfigurationParameters() = listOf( + // hasTracer, tracerApiName, tracerApiVersion + Triple( + true, + TelemetryEventHandler.TracerApi.OpenTracing, + null + ), + Triple( + true, + TelemetryEventHandler.TracerApi.OpenTelemetry, + BuildConfig.OPENTELEMETRY_API_VERSION_NAME + ), + Triple(false, null, null) + ) + private const val MAX_EVENTS_PER_SESSION_TEST = 10 } } diff --git a/features/dd-sdk-android-trace/src/main/kotlin/com/datadog/android/trace/OtelTracerProvider.kt b/features/dd-sdk-android-trace/src/main/kotlin/com/datadog/android/trace/OtelTracerProvider.kt index b0333638b4..d2d9183cb1 100644 --- a/features/dd-sdk-android-trace/src/main/kotlin/com/datadog/android/trace/OtelTracerProvider.kt +++ b/features/dd-sdk-android-trace/src/main/kotlin/com/datadog/android/trace/OtelTracerProvider.kt @@ -158,6 +158,9 @@ class OtelTracerProvider( sdkCore.removeActiveTraceFromContext() } }) + sdkCore.updateFeatureContext(Feature.TRACING_FEATURE_NAME) { + it[TracingFeature.IS_OPENTELEMETRY_ENABLED_CONFIG_KEY] = true + } return OtelTracerProvider(sdkCore, coreTracer, sdkCore.internalLogger, bundleWithRumEnabled) } diff --git a/features/dd-sdk-android-trace/src/main/kotlin/com/datadog/android/trace/internal/TracingFeature.kt b/features/dd-sdk-android-trace/src/main/kotlin/com/datadog/android/trace/internal/TracingFeature.kt index 7ae7a57e9c..5e437547a7 100644 --- a/features/dd-sdk-android-trace/src/main/kotlin/com/datadog/android/trace/internal/TracingFeature.kt +++ b/features/dd-sdk-android-trace/src/main/kotlin/com/datadog/android/trace/internal/TracingFeature.kt @@ -94,4 +94,8 @@ internal class TracingFeature constructor( internalLogger = internalLogger ) } + + companion object { + internal const val IS_OPENTELEMETRY_ENABLED_CONFIG_KEY = "is_opentelemetry_enabled" + } } diff --git a/features/dd-sdk-android-trace/src/test/kotlin/com/datadog/android/trace/OtelTracerBuilderProviderTest.kt b/features/dd-sdk-android-trace/src/test/kotlin/com/datadog/android/trace/OtelTracerBuilderProviderTest.kt index 1615fa2815..e2d869e5d8 100644 --- a/features/dd-sdk-android-trace/src/test/kotlin/com/datadog/android/trace/OtelTracerBuilderProviderTest.kt +++ b/features/dd-sdk-android-trace/src/test/kotlin/com/datadog/android/trace/OtelTracerBuilderProviderTest.kt @@ -815,8 +815,8 @@ internal class OtelTracerBuilderProviderTest { // Then argumentCaptor<(MutableMap) -> Unit> { val traceContext: MutableMap = mutableMapOf() - verify(mockSdkCore, times(2)).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture()) - firstValue.invoke(traceContext) + verify(mockSdkCore, times(3)).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture()) + secondValue.invoke(traceContext) val activeTraceContext = traceContext[expectedActiveTraceContextName] as Map assertThat(activeTraceContext).containsEntry("trace_id", expectedTraceId) assertThat(activeTraceContext).containsEntry("span_id", expectedSpanId) @@ -852,7 +852,7 @@ internal class OtelTracerBuilderProviderTest { // Then argumentCaptor<(MutableMap) -> Unit> { val traceContext: MutableMap = mutableMapOf() - verify(mockSdkCore, times(1)).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture()) + verify(mockSdkCore, times(2)).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture()) lastValue.invoke(traceContext) assertThat(traceContext).doesNotContainKey(expectedActiveTraceContextName) } @@ -860,6 +860,39 @@ internal class OtelTracerBuilderProviderTest { // endregion + // region Tracing context + + @Test + fun `M set opentelemetry as enabled in Context W build { TracingFeature enabled }`() { + // WHEN + testedOtelTracerProviderBuilder.build() + + // THEN + argumentCaptor<(MutableMap) -> Unit> { + val traceContext: MutableMap = mutableMapOf() + verify(mockSdkCore, times(1)).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture()) + lastValue.invoke(traceContext) + assertThat(traceContext[TracingFeature.IS_OPENTELEMETRY_ENABLED_CONFIG_KEY]).isEqualTo(true) + } + } + + @Test + fun `M set opentelemetry as enabled in Context W build { TracingFeature not enabled }`() { + // WHEN + testedOtelTracerProviderBuilder.build() + whenever(mockSdkCore.getFeature(Feature.TRACING_FEATURE_NAME)) doReturn null + + // THEN + argumentCaptor<(MutableMap) -> Unit> { + val traceContext: MutableMap = mutableMapOf() + verify(mockSdkCore, times(1)).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture()) + lastValue.invoke(traceContext) + assertThat(traceContext[TracingFeature.IS_OPENTELEMETRY_ENABLED_CONFIG_KEY]).isEqualTo(true) + } + } + + // endregion + companion object { val forge = Forge()