Skip to content

Make dd-trace-java.muzzle reports additional JVM data in test task inputs - #12631

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
masterfrom
bdu/muzzle-jvm-cache-inputs
Sep 25, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
masterfrom
bdu/muzzle-jvm-cache-inputs

Conversation

@bric3

@bric3 bric3 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Improve the muzzle directive using coreJdk(version) fingerprinting in Gradle. This API takes either a JDK version or the Gradle daemon JVM if no version is specified coreJdk(). Now this tracks the actual Java major version, vendor and full runtime/VM versions, while previous it only recored the major version if any.

muzzle {
  pass {
    coreJdk("25")
  }
}

To be more precise, the directive above creates a muzzle-AssertPass-core-jdk task, running in a worker on the selected JDK 25. It expects the instrumentation's Muzzle checks to succeed with that JDK's platform classes available. With this change, a different JDK vendor or patch/build invalidates the cached result, if the actual JDK install remains the same the result can be reused.

Motivation

A JDK patch/build or vendor change should invalidate cached core-JDK checks, even when the requested Java major version stays the same.

Related to the S3 build cache in #12604.

Additional Notes

Use reported JVM metadata, without hashing JDK binaries.

Verified with Gradle on JDK 21: switching coreJdk("25") from Corretto 25.0.3 to 25.0.4 changes the cache key and runs the check on the selected JDK.

Contributor Checklist

@bric3 bric3 added type: bug fix Bug fix tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM labels Sep 24, 2026
@datadog-datadog-prod-us1-2

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.81 s 14.71 s [-0.1%; +1.5%] (no difference)
startup:insecure-bank:tracing:Agent 13.60 s 13.73 s [-1.6%; -0.2%] (maybe better)
startup:petclinic:appsec:Agent 17.70 s 17.51 s [+0.3%; +1.9%] (maybe worse)
startup:petclinic:iast:Agent 17.32 s 17.60 s [-2.5%; -0.7%] (maybe better)
startup:petclinic:profiling:Agent 17.57 s 17.38 s [-0.1%; +2.3%] (no difference)
startup:petclinic:sca:Agent 17.67 s 17.47 s [+0.3%; +2.0%] (maybe worse)
startup:petclinic:tracing:Agent 16.23 s 16.58 s [-6.6%; +2.3%] (no difference)

Commit: 0c935616 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@bric3 bric3 changed the title Fingerprint the validation JVM in Muzzle task inputs Make dd-trace-java.muzzle report additional JVM detail as task inputs Sep 24, 2026
@bric3 bric3 changed the title Make dd-trace-java.muzzle report additional JVM detail as task inputs Fingerprint the JDK for core-JDK Muzzle checks Sep 24, 2026
@bric3 bric3 changed the title Fingerprint the JDK for core-JDK Muzzle checks Make dd-trace-java.muzzle reports additional JVM data in test task inputs Sep 24, 2026
@bric3
bric3 marked this pull request as ready for review September 24, 2026 16:15
@bric3
bric3 requested review from a team as code owners September 24, 2026 16:15
@bric3
bric3 requested review from PerfectSlayer and removed request for a team September 24, 2026 16:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T16:21:20.690427Z aa5d804 Draft marked ready
🔒 Security Review ✅ Completed 2026-09-24T16:18:06.364799Z aa5d804 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa5d8047e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread buildSrc/src/main/kotlin/datadog/gradle/plugin/muzzle/tasks/MuzzleTask.kt Outdated

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The selected Java launcher supplies both the cache identity and the worker executable. Daemon JVM identity applies only to core-JDK checks.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit aa5d804 · @DataDog review to ask questions

@sarahchen6 sarahchen6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bric3 bric3 mentioned this pull request Sep 24, 2026
7 tasks
@bric3

bric3 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-25 09:44:45 UTC ℹ️ Start processing command /merge


2026-09-25 09:44:50 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-09-25 10:58:34 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 53a4c9e into master Sep 25, 2026
814 of 816 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the bdu/muzzle-jvm-cache-inputs branch September 25, 2026 10:58
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants