Skip to content

Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations - #12103

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
sarahchen6/remove-java-tool-options-check
Jul 29, 2026
Merged

Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations#12103
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
sarahchen6/remove-java-tool-options-check

Conversation

@sarahchen6

@sarahchen6 sarahchen6 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations Gradle task.

Motivation

Recent Fabric Egress Gateway changes in CI injected proxy settings through JAVA_TOOLS_OPTIONS which the JVM echoes to stderr. Any info in stderr causes the verification task to fail, so this led to a broken CI. The verification task intends to confirm class and metadata info, not tool options, so we can remove the JAVA_TOOLS_OPTIONS check entirely.

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@sarahchen6
sarahchen6 requested a review from a team as a code owner July 29, 2026 17:55
@sarahchen6
sarahchen6 requested a review from amarziali July 29, 2026 17:55
@sarahchen6 sarahchen6 added type: bug fix Bug fix tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels Jul 29, 2026

@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.

Datadog Autotest: PASS

More details

The verification task now isolates its child JVM from inherited JAVA_TOOL_OPTIONS, and the integration-listing path still executes cleanly under valid and misspelled environment-variable inputs. The project task itself could not be launched in this sandbox because the required JDK 25 and Gradle 9.6.1 distribution were unavailable, but the exact JavaExec environment-removal behavior passed in an isolated harness.

Was this helpful? React 👍 or 👎

📊 Validated against 3 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 5967499 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD 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.

Approving to unblock the team.
Let's follow up on proper fix if it make sense.

Comment on lines +625 to +627
// Listing integrations only inspects classes and metadata in the assembled agent jar, so it does
// not need inherited JAVA_TOOL_OPTIONS.
environment.remove('JAVA_TOOL_OPTIONS')

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.

I think we can follow this way as a fix (and maybe even keep it).
As alternative solution we may probably need to make check logic more robust.
like add some sort of begin marker and end marker and analyze output between markers.

I just executed locally:
java -jar dd-java-agent/build/libs/dd-java-agent-1.65.0-SNAPSHOT.jar --list-integrations
and got the output:

IastInstrumentation
aerospike
akka-http
....
zio.experimental

So as possible improvements we can generate something like:
java -jar dd-java-agent/build/libs/dd-java-agent-1.65.0-SNAPSHOT.jar --list-integrations --with-marker

List of dd-trace-java integrations:
==============
IastInstrumentation
aerospike
akka-http
....
zio.experimental
===============

This is just my idea and this solution will require more work.

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.

@AlexeyKuznetsov-DD I'm not sure it's worth introducing this option in the tracer. I.e. I don't see how it would benefit other usages.

@datadog-datadog-prod-us1-2

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 69.73% (+11.91%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5967499 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 29, 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 13.93 s 13.96 s [-0.9%; +0.5%] (no difference)
startup:insecure-bank:tracing:Agent 12.96 s 12.97 s [-0.7%; +0.7%] (no difference)
startup:petclinic:appsec:Agent 17.00 s 16.75 s [+0.5%; +2.5%] (maybe worse)
startup:petclinic:iast:Agent 16.86 s 17.03 s [-1.7%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 16.93 s 16.94 s [-1.4%; +1.3%] (no difference)
startup:petclinic:sca:Agent 16.99 s 16.14 s [+0.8%; +9.8%] (maybe worse)
startup:petclinic:tracing:Agent 16.07 s 16.19 s [-1.9%; +0.4%] (no difference)

Commit: 59674991 · 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.


// Listing integrations only inspects classes and metadata in the assembled agent jar, so it does
// not need inherited JAVA_TOOL_OPTIONS.
environment.remove('JAVA_TOOL_OPTIONS')

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.

Q: Does this remove the ENV from this Gradle task only? Meaning this would not affect other tasks running as part of the same build which may require JAVA_TOOL_OPTIONS?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes - JAVA_TOOLS_OPTIONS is removed only from the child JVM of the verifyAgentJarIntegrations Gradle task!

@sarahchen6

Copy link
Copy Markdown
Contributor Author

/merge --f --reason "Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ"

@gh-worker-devflow-routing-ef8351

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-29 19:20:12 UTC ℹ️ Start processing command /merge --f --reason "Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ"
If you need support, contact us on Slack #devflow.!


2026-07-29 19:20:12 UTC 🚨 Devflow: /merge --f --reason "Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ"

Failed to generate input: unknown flag: --f

If you need support, contact us on Slack #devflow. with those details!

@sarahchen6

Copy link
Copy Markdown
Contributor Author

/merge -f --reason "Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ"

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jul 29, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-29 19:21:07 UTC ℹ️ Start processing command /merge -f --reason "Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ"


2026-07-29 19:21:13 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 0s (p90).


2026-07-29 19:21:23 UTC ℹ️ MergeQueue: This merge request was merged

Warning

This change was merged without running any pre merge CI checks

Reason: Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 693988c into master Jul 29, 2026
785 of 794 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the sarahchen6/remove-java-tool-options-check branch July 29, 2026 19:21
@github-actions github-actions Bot added this to the 1.65.0 milestone Jul 29, 2026
Comment on lines +625 to +627
// Listing integrations only inspects classes and metadata in the assembled agent jar, so it does
// not need inherited JAVA_TOOL_OPTIONS.
environment.remove('JAVA_TOOL_OPTIONS')

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.

@AlexeyKuznetsov-DD I'm not sure it's worth introducing this option in the tracer. I.e. I don't see how it would benefit other usages.


// Listing integrations only inspects classes and metadata in the assembled agent jar, so it does
// not need inherited JAVA_TOOL_OPTIONS.
environment.remove('JAVA_TOOL_OPTIONS')

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.

note: There are another special env var JDK_JAVA_OPTIONS that offer a similar feature (albeit with some restrictions). (Ignoring the undocumented, internal hotspot specific _JAVA_OPTIONS).

That said, I'm not sure this is worth a follow-up at this time.

piochelepiotr pushed a commit that referenced this pull request Aug 5, 2026
…2103)

Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations

Co-authored-by: sarah.chen <sarah.chen@datadoghq.com>
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Aug 5, 2026
Capture Kafka consumer group membership on join for DSM

Instrument ConsumerCoordinator.onJoinComplete (kafka-clients 0.11 and 3.8)
to report the broker-assigned member id, generation id and negotiated
member protocol each time a consumer (re)joins a group. Reported through
Data Streams Monitoring alongside the consumer group and cluster id via a
new reportKafkaConsumerGroupMember path (member_host is not available
client-side and is intentionally omitted).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

kafka: skip membership report when cluster id is unknown

A membership report can't be attributed downstream without a cluster id, so
skip it (the kafka_consumer integration reports the member with the cluster id
and the tracer re-reports on the next rejoin) rather than emit an empty-cluster row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Fix membership dedup ordering and strip comments from kafka DSM membership reporting

Only mark a membership as reported once reportConsumerGroupMember
actually attempts the report (i.e. cluster id is known), instead of
marking it unconditionally before the cluster-id check. Also aligns
generationId serialization with writeInt/unpackInt used elsewhere for
int fields, and removes redundant/duplicated comments introduced by
the feature.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Restore pre-existing comments accidentally stripped in previous cleanup

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Encapsulate Kafka membership change detection

Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations (#12103)

Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations

Co-authored-by: sarah.chen <sarah.chen@datadoghq.com>

Co-authored-by: sarahchen6 <sarah.chen@datadoghq.com>
Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling 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.

5 participants