Skip to content

Commit 0795ece

Browse files
authored
Merge pull request #3592 from DataDog/abrooks/merge-develop-css
Merge develop into feature/client-side-stats
2 parents a0bae5a + 0c0f6b4 commit 0795ece

173 files changed

Lines changed: 6355 additions & 1222 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@
66

77
/docs/ @DataDog/documentation @DataDog/rum-mobile
88
*README.md @DataDog/documentation @DataDog/rum-mobile
9+
10+
## Feature Flags
11+
12+
/features/dd-sdk-android-flags-openfeature/ @DataDog/rum-mobile @DataDog/rum-mobile-android @DataDog/feature-flags-sdks
13+
/features/dd-sdk-android-flags-openfeature/README.md @DataDog/documentation @DataDog/rum-mobile @DataDog/rum-mobile-android @DataDog/feature-flags-sdks

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ variables:
1010
DD_COMMON_AGENT_CONFIG: "dd.env=ci,dd.trace.enabled=false,dd.jmx.fetch.enabled=false"
1111

1212
KUBERNETES_MEMORY_REQUEST: "8Gi"
13-
KUBERNETES_MEMORY_LIMIT: "13Gi"
13+
KUBERNETES_MEMORY_LIMIT: "32Gi"
1414

1515
EMULATOR_NAME: "android_emulator"
1616
ANDROID_ARCH: "arm64-v8a"

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
# 3.11.0 / 2026-06-16
2+
3+
* [FEATURE] Support `addEvent` for OpenTelemetry spans (logging events). See [#3377](https://github.com/DataDog/dd-sdk-android/pull/3377)
4+
* [FEATURE] Add cross-product sampling rebasing for RUM-to-APM correlation. See [#3402](https://github.com/DataDog/dd-sdk-android/pull/3402)
5+
* [FEATURE] Report carrier info on Android API 24+. See [#3449](https://github.com/DataDog/dd-sdk-android/pull/3449)
6+
* [FEATURE] Add trace sampling decision to `DatadogEventBridge`. See [#3495](https://github.com/DataDog/dd-sdk-android/pull/3495)
7+
* [IMPROVEMENT] Preserve custom `DeterministicTraceSampler` subclasses from rebasing. See [#3455](https://github.com/DataDog/dd-sdk-android/pull/3455)
8+
* [IMPROVEMENT] Rename `last_failure_status` to `retry_after`. See [#3459](https://github.com/DataDog/dd-sdk-android/pull/3459)
9+
* [IMPROVEMENT] Optimize `isMainProcess` detection. See [#3489](https://github.com/DataDog/dd-sdk-android/pull/3489)
10+
* [IMPROVEMENT] Add name support for work units in `BackPressureExecutorService#submit`. See [#3492](https://github.com/DataDog/dd-sdk-android/pull/3492)
11+
* [IMPROVEMENT] Remove regex usage in `MemoryVitalReader`. See [#3499](https://github.com/DataDog/dd-sdk-android/pull/3499)
12+
* [IMPROVEMENT] Read process importance early. See [#3504](https://github.com/DataDog/dd-sdk-android/pull/3504)
13+
* [IMPROVEMENT] Enforce schema character set on `vital.name` in Operation APIs. See [#3393](https://github.com/DataDog/dd-sdk-android/pull/3393)
14+
* [IMPROVEMENT] Route `androidNetworkInstrumentation` through `InternalLogger#logApiUsage`. See [#3516](https://github.com/DataDog/dd-sdk-android/pull/3516)
15+
* [IMPROVEMENT] Flags: rename flag names to flag keys. See [#3527](https://github.com/DataDog/dd-sdk-android/pull/3527)
16+
* [IMPROVEMENT] Write `CUSTOM` RUM actions immediately. See [#3525](https://github.com/DataDog/dd-sdk-android/pull/3525)
17+
* [IMPROVEMENT] Move broadcast-receiver dispatch off the main thread to reduce ANRs. See [#3524](https://github.com/DataDog/dd-sdk-android/pull/3524)
18+
* [IMPROVEMENT] Flags: thread `allocationKey` into `ResolutionDetails` flag metadata. See [#3534](https://github.com/DataDog/dd-sdk-android/pull/3534)
19+
* [IMPROVEMENT] Pass `InternalLogger` through the Session Replay mappers. See [#3518](https://github.com/DataDog/dd-sdk-android/pull/3518)
20+
* [IMPROVEMENT] Add `Context.getSystemServiceAs` extension. See [#3451](https://github.com/DataDog/dd-sdk-android/pull/3451)
21+
* [BUGFIX] Catch exception on the battery level query. See [#3453](https://github.com/DataDog/dd-sdk-android/pull/3453)
22+
* [BUGFIX] Catch `Throwable.loggableStackTrace()` throws. See [#3458](https://github.com/DataDog/dd-sdk-android/pull/3458)
23+
* [BUGFIX] Ignore dropped local active span in RUM-to-APM path. See [#3406](https://github.com/DataDog/dd-sdk-android/pull/3406)
24+
* [BUGFIX] Atomically write NDK crash logs and catch `NumberFormatException`. See [#3425](https://github.com/DataDog/dd-sdk-android/pull/3425)
25+
* [BUGFIX] Fix tap target mis-attribution for views clipped by scrolling ancestors. See [#3473](https://github.com/DataDog/dd-sdk-android/pull/3473)
26+
* [BUGFIX] Make file write atomic. See [#3476](https://github.com/DataDog/dd-sdk-android/pull/3476)
27+
* [BUGFIX] Catch `IllegalArgumentException` when reading trace input stream for last fatal ANR. See [#3483](https://github.com/DataDog/dd-sdk-android/pull/3483)
28+
* [BUGFIX] Fix `WorkDatabase` initialization crash in R8 full mode. See [#3502](https://github.com/DataDog/dd-sdk-android/pull/3502)
29+
* [BUGFIX] Catch errors in `convertToRumViewAttributes`. See [#3497](https://github.com/DataDog/dd-sdk-android/pull/3497)
30+
* [BUGFIX] Fix gradients not showing in Compose Session Replay. See [#3471](https://github.com/DataDog/dd-sdk-android/pull/3471)
31+
* [BUGFIX] Fix hidden API reflection noise in Session Replay drawable mappers. See [#3539](https://github.com/DataDog/dd-sdk-android/pull/3539)
32+
* [BUGFIX] Fix wrong API doc for text and input privacy configuration in Session Replay. See [#3520](https://github.com/DataDog/dd-sdk-android/pull/3520)
33+
* [MAINTENANCE] `NoOpImplementation` improvements: support for nested interfaces. See [#3468](https://github.com/DataDog/dd-sdk-android/pull/3468)
34+
* [MAINTENANCE] `NoOpImplementation` improvements: guard NoOp generation against restricted-visibility. See [#3469](https://github.com/DataDog/dd-sdk-android/pull/3469)
35+
* [MAINTENANCE] `NoOpImplementation` improvements: add name collision detection and `customName` support. See [#3470](https://github.com/DataDog/dd-sdk-android/pull/3470)
36+
* [MAINTENANCE] Sign automatically created commits. See [#3462](https://github.com/DataDog/dd-sdk-android/pull/3462)
37+
* [MAINTENANCE] Bump `ktlint` and `detekt` versions. See [#3444](https://github.com/DataDog/dd-sdk-android/pull/3444)
38+
* [MAINTENANCE] Resolve dependencies through Magic Mirror Depot in CI. See [#3452](https://github.com/DataDog/dd-sdk-android/pull/3452)
39+
* [MAINTENANCE] Benchmarking: enable RUM for Session Replay baseline run. See [#3467](https://github.com/DataDog/dd-sdk-android/pull/3467)
40+
* [MAINTENANCE] Add integration test for cross-product trace sampling rebasing. See [#3464](https://github.com/DataDog/dd-sdk-android/pull/3464)
41+
* [MAINTENANCE] Benchmark: fix app crash when running baseline for the Session Replay scenario. See [#3474](https://github.com/DataDog/dd-sdk-android/pull/3474)
42+
* [MAINTENANCE] Fix flaky `InternalApiUsageDetectorTest` due to Kotlin reserved keywords in package regex. See [#3522](https://github.com/DataDog/dd-sdk-android/pull/3522)
43+
* [MAINTENANCE] Fix Detekt stack overflow on wildcard projections. See [#3528](https://github.com/DataDog/dd-sdk-android/pull/3528)
44+
* [MAINTENANCE] Bump Datadog Gradle Plugin to `1.27.0`. See [#3533](https://github.com/DataDog/dd-sdk-android/pull/3533)
45+
* [MAINTENANCE] Move `FakeSameThreadExecutorService` into core test fixtures. See [#3536](https://github.com/DataDog/dd-sdk-android/pull/3536)
46+
147
# 3.10.0 / 2026-05-13
248

349
* [FEATURE] Network headers common instrumentation. See [#3338](https://github.com/DataDog/dd-sdk-android/pull/3338)

buildSrc/src/main/kotlin/com/datadog/gradle/KotlinDSLUtils.kt

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

buildSrc/src/main/kotlin/com/datadog/gradle/config/AndroidConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ object AndroidConfig {
1919
const val MIN_SDK_FOR_AUTO = 29
2020
const val BUILD_TOOLS_VERSION = "36.0.0"
2121

22-
val VERSION = Version(3, 11, 0, Version.Type.Snapshot)
22+
val VERSION = Version(3, 12, 0, Version.Type.Snapshot)
2323
}
2424

2525
// TODO RUM-628 Switch to Java 17 bytecode

buildSrc/src/main/kotlin/com/datadog/gradle/config/DetektCustomConfig.kt

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import org.gradle.api.tasks.Copy
2121
import org.gradle.api.tasks.Input
2222
import org.gradle.api.tasks.JavaExec
2323
import org.gradle.api.tasks.TaskAction
24+
import org.gradle.api.tasks.bundling.Zip
2425
import org.gradle.kotlin.dsl.findByType
2526
import org.gradle.kotlin.dsl.register
2627
import java.io.File
@@ -107,40 +108,53 @@ fun Project.detektCustomConfig() {
107108
}
108109

109110
tasks.register<Copy>("unzipAarForDetekt") {
110-
from(zipTree(layout.buildDirectory.file("outputs/aar/${project.name}-release.aar")))
111+
val aarFile = tasks.named<Zip>("bundleReleaseAar", Zip::class.java).flatMap { it.archiveFile }
112+
from(zipTree(aarFile))
111113
into(layout.buildDirectory.dir("extracted"))
112114
}
113115

114116
tasks.register<JavaExec>("customDetektRules") {
115117
group = "datadog"
118+
maxHeapSize = "2g"
119+
dependsOn("printDetektClasspath")
116120

117121
classpath = files("${rootDir.absolutePath}/detekt-cli-1.23.8-all.jar")
118122

119123
args(
120124
"--config",
121125
"${rootDir.absolutePath}/detekt_custom_general.yml," +
122-
"${rootDir.absolutePath}/detekt_custom_safe_calls.yml," +
126+
"${rootDir.absolutePath}/detekt_custom_safe_calls_android.yml," +
127+
"${rootDir.absolutePath}/detekt_custom_safe_calls_third_party.yml," +
123128
"${rootDir.absolutePath}/detekt_custom_unsafe_calls.yml"
124129
)
125130
args("--plugins", "${rootDir.absolutePath}/tools/detekt/build/libs/detekt.jar")
126131
args("-i", projectDir.absolutePath)
127132
args("-ex", "**/*.kts")
128133
args("--jvm-target", "11")
129134

135+
// Resolve project paths at configuration time (config-cache friendly), but defer all
136+
// detekt_classpath file I/O to execution time. The file is produced by the
137+
// printDetektClasspath task, so it may not exist when this task is configured (e.g. while
138+
// computing the task graph for assembleLibrariesRelease). Reading it here would fail task
139+
// creation and break the whole build.
130140
val moduleDependencies = collectTransitiveProjectDependencies(project)
141+
val rootDirPath = rootDir.absolutePath
142+
val detektClasspathFile = File("${projectDir.absolutePath}/detekt_classpath")
131143

132-
val externalDependencies = File("${projectDir.absolutePath}/detekt_classpath").readText()
133-
val moduleDependenciesClasses = moduleDependencies.joinToString(":") {
134-
"${rootDir.absolutePath}${it.replace(':', '/')}/build/extracted/classes.jar"
135-
}
144+
doFirst {
145+
val externalDependencies = detektClasspathFile.readText()
146+
val moduleDependenciesClasses = moduleDependencies.joinToString(":") {
147+
"$rootDirPath${it.replace(':', '/')}/build/extracted/classes.jar"
148+
}
136149

137-
val dependencies = if (moduleDependenciesClasses.isBlank()) {
138-
externalDependencies
139-
} else {
140-
"$externalDependencies:$moduleDependenciesClasses"
141-
}
150+
val dependencies = if (moduleDependenciesClasses.isBlank()) {
151+
externalDependencies
152+
} else {
153+
"$externalDependencies:$moduleDependenciesClasses"
154+
}
142155

143-
args("-cp", dependencies)
156+
args("-cp", dependencies)
157+
}
144158
}
145159
}
146160

buildSrc/src/main/kotlin/com/datadog/gradle/config/TestPyramidConfig.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ fun Project.registerSubModuleAggregationTask(
2323
subProject.name.startsWith(subModuleNamePrefix) &&
2424
subProject.path.startsWith(subModulePathPrefix)
2525
) {
26-
dependsOn("${subProject.path}:$subModuleTaskName")
26+
// Lazily depend on the task only when the submodule registers it: `tasks.names`
27+
// reads registered task names without creating any task, and `named()` returns a
28+
// lazy provider, so unrelated tasks are never configured. The membership check
29+
// matters because not every submodule registers every aggregated task (e.g.
30+
// printDetektClasspath only exists where detekt is applied).
31+
if (subModuleTaskName in subProject.tasks.names) {
32+
dependsOn(subProject.tasks.named(subModuleTaskName))
33+
}
2734
}
2835
}
2936
additionalConfiguration()

buildSrc/src/main/kotlin/com/datadog/gradle/utils/JsonSchemaGenerationTasks.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
package com.datadog.gradle.utils
88

9+
import com.android.build.gradle.tasks.ExtractAnnotations
910
import com.android.build.gradle.tasks.SourceJarTask
1011
import com.datadog.gradle.config.taskConfig
1112
import com.datadog.gradle.plugin.apisurface.GenerateApiSurfaceTask
@@ -100,10 +101,18 @@ fun Project.createJsonModelsGenerationTask(
100101
dependsOn(task)
101102
}
102103

104+
tasks.matching { it.name.startsWith("ksp") && it.name.endsWith("Kotlin") }.configureEach {
105+
dependsOn(task)
106+
}
107+
103108
// need to add an explicit dependency, otherwise there is an error during publishing
104109
// Task 'sourceReleaseJar' uses this output of task
105110
// this task without declaring an explicit or implicit dependency
106111
taskConfig<SourceJarTask> {
107112
dependsOn(task)
108113
}
114+
115+
taskConfig<ExtractAnnotations> {
116+
dependsOn(task)
117+
}
109118
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2016-Present Datadog, Inc.
5+
*/
6+
7+
import org.gradle.api.artifacts.VersionCatalogsExtension
8+
9+
// Adds the shared unit-test dependencies (JUnit 5 + the common test-tooling bundle: Elmyr, AssertJ,
10+
// mockito-kotlin, …) to a module's `test` source set. Apply with `id("unitTest")`.
11+
//
12+
// `kotlin-stdlib` is deliberately not added — the Kotlin plugin already contributes it to every
13+
// source set, so adding it again would duplicate it.
14+
15+
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
16+
listOf("jUnit5", "testTools").forEach { bundleName ->
17+
libs.findBundle(bundleName).ifPresent { bundle ->
18+
dependencies.addProvider("testImplementation", bundle)
19+
}
20+
}

0 commit comments

Comments
 (0)