Add code coverage report flags#11981
Conversation
Test Environment - sbt-scalatestJob Status: 🟢 success
Baseline: median of |
Test Environment - nebula-release-pluginJob Status: 🟢 success
Baseline: median of |
|
🎯 Code Coverage (details) 🔗 Commit SHA: 34c0678 | Docs | Datadog PR Page | Give us feedback! |
Test Environment - netflix-zuulJob Status: 🟢 success
Baseline: median of |
Test Environment - pass4sJob Status: 🟢 success
Baseline: median of |
Test Environment - reactive-streams-jvmJob Status: 🟢 success
Baseline: median of |
Test Environment - heliboardJob Status: 🟢 success
Baseline: median of |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Test Environment - sonar-kotlinJob Status: 🟢 success
Baseline: median of |
Bits couldn’t fix the CI🟢 Investigated · 🔴 Fix failed · ⚪ Validate · ⚪ Ready
View in Datadog | Reviewed commit f6fd6c1 |
Test Environment - jolokiaJob Status: 🟢 success
Baseline: median of |
Test Environment - okhttpJob Status: 🟢 success
Baseline: median of |
daniel-mohedano
left a comment
There was a problem hiding this comment.
LGTM, left a small nit 🚀
Test Environment - spring_bootJob Status: 🟢 success
Baseline: median of |
There was a problem hiding this comment.
More details
Configuration parsing correctly handles all edge cases: empty entries are filtered by ConfigProvider.parseList before reaching the validation code, max-32-flags limit is enforced with fail-open warning, flags are immutably copied and properly serialized as JSON array in the upload event. Event map type changed from Map<String, String> to Map<String, Object> with Moshi adapter type updated accordingly. Test migration from Groovy to Java is complete with comprehensive edge-case coverage. No behavioral regressions detected.
📊 Validated against 8 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 34c0678 · What is Autotest? · Any feedback? Reach out in #autotest
Test Environment - sonar-javaJob Status: 🟢 success
Baseline: median of |
Bits couldn’t fix the CI🟢 Investigated · 🔴 Fix failed · ⚪ Validate · ⚪ Ready
View in Datadog | Reviewed commit 34c0678 |
What Does This Do
Adds support for
DD_CODE_COVERAGE_FLAGSto Test Optimization coverage-report uploads. Values are parsed as comma-separated flags, trimmed, and included in the multipart event as the JSON string arrayreport.flags.The configuration preserves flag order and duplicates, removes empty entries, and applies the same immutable snapshot to every report uploaded by the process. More than 32 flags logs a warning, omits
report.flags, and continues the upload.Registers the configuration metadata and migrates
CoverageReportUploaderTestfrom Spock/Groovy to JUnit 5 Java.Motivation
Coverage reports uploaded by the Java tracer could not use the same grouping flags supported by
datadog-ci coverage upload --flags. This makes the Java uploader compatible with that payload shape while preserving fail-open tracer behavior.Additional Notes
Validation:
./gradlew :internal-api:test --tests datadog.trace.api.ConfigCodeCoverageFlagsTest./gradlew :dd-java-agent:agent-ci-visibility:test --tests datadog.trace.civisibility.coverage.report.CoverageReportUploaderTest./gradlew :internal-api:test --tests datadog.trace.api.telemetry.ConfigInversionMetricCollectorImplTest./gradlew :dd-trace-api:spotlessCheck :internal-api:spotlessCheck :dd-java-agent:agent-ci-visibility:spotlessCheck./gradlew :internal-api:compileJavaContributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]