Fix metrics-api JaCoCo coverage gate - #12456
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
Conversation
The module never opted into the excludedClassesCoverage convention used by sibling modules, so the repo-wide 0.9 minimum instruction/ branch coverage rule failed for every NoOp* class as soon as CI ran this module's full check task. Exclude the true no-op classes and add real unit tests for the classes with actual logic (Histograms registration/dispatch, StatsDClientManager's default overload, Recording.close() delegating to stop()). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
🟢 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. |
There was a problem hiding this comment.
More details
The coverage exclusions match the no-op and interface classes. The new tests cover the remaining default and factory behavior.
🤖 Datadog Autotest · Commit be114a1 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
products/metrics/metrics-apinever opted into theexcludedClassesCoverageconvention used by sibling modules, so the repo-wide 0.9 minimum instruction/branch coverage rule failed for everyNoOp*class as soon as CI ran this module's fullchecktask (module-scoped CI hadn't run a fullcheckhere in a while).NoOpCounter,NoOpHistogram,NoOpHistogramsFactory,NoOpMonitoring,NoOpRecording,NoOpStatsDClient) and the pure-interfaceMonitoring.src/testtree with real unit tests for the classes that have actual untested logic:Histograms(registration + static factory dispatch),StatsDClientManager(default 5-arg overload delegating to the 6-arg one),Recording(close()delegates tostop()), and a smallStatsDClienttest to clear its defaultrecordEventmethod.Motivation
Unrelated to any in-flight feature work — this is a pre-existing coverage gap surfaced while working on #12351, which switched
metrics-api'sbuild.gradle.ktsto thedd-trace-java.module.internal-apiplugin and newly exposed the module to this gate. Kept as its own PR rather than folded into #12351, since the two are independent and shouldn't be reviewed together.Additional Notes
./gradlew :products:metrics:metrics-api:test./gradlew :products:metrics:metrics-api:jacocoTestCoverageVerification./gradlew :products:metrics:metrics-api:checkContributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueJira ticket: none — pre-existing gap found incidentally, not tracked separately
🤖 Generated with Claude Code