Skip to content

Commit d361e7e

Browse files
kikoveigaclaude
andcommitted
RUM-14050: Fix R8 missing class error for dd-java-agent annotations
When dd-java-agent is attached to the Gradle daemon (introduced in #3583 via setup-gradle), it instruments classes at load time for source code profiling, injecting references to datadog.compiler.annotations. SourceLines and datadog.compiler.annotations.SourcePath into bytecode. R8 then sees these references but can't find the annotation class definitions in the build classpath, causing a hard failure in every publish-benchmark-synthetics (and potentially other synthetics) CI job since that PR merged. Add -dontwarn rules for datadog.compiler.annotations.** in the benchmark and kotlin sample proguard files so R8 ignores these agent-injected annotation references. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent 3533bee commit d361e7e

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

sample/benchmark/proguard-rules.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
-dontwarn reactor.blockhound.integration.BlockHoundIntegration
2828
# These annotations are introduced by OpenTelemetry API and we need to make sure R8 will not complain about them
2929
-dontwarn com.google.**
30+
# These annotations are injected by dd-java-agent at class-load time for source code profiling.
31+
# They are not present in the build classpath, so R8 must not treat them as errors.
32+
-dontwarn datadog.compiler.annotations.**
3033

3134
-keepattributes RuntimeVisibleAnnotations
3235
-keep class * extends androidx.navigation.Navigator

sample/kotlin/proguard-rules.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@
3232
-dontwarn java.lang.management.RuntimeMXBean
3333
# These annotations are introduced by OpenTelemetry API and we need to make sure R8 will not complain about them
3434
-dontwarn com.google.**
35+
# These annotations are injected by dd-java-agent at class-load time for source code profiling.
36+
# They are not present in the build classpath, so R8 must not treat them as errors.
37+
-dontwarn datadog.compiler.annotations.**

0 commit comments

Comments
 (0)