Skip to content

Agent integrations checks#11692

Open
bric3 wants to merge 4 commits into
masterfrom
bdu/agent-integrations-check
Open

Agent integrations checks#11692
bric3 wants to merge 4 commits into
masterfrom
bdu/agent-integrations-check

Conversation

@bric3

@bric3 bric3 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

  • Verify the agent can list its integrations at runtime via --list-integrations, comparing output against a committed golden file (expected-integrations.txt)

Motivation

Improve the safety of publishing a bad agent jar. This is a followup to #11684

The runtime integration check goes further as it exercises dd-java-agent.index, inst/instrumenter.index, and instrumentation class loading end-to-end.

Additional Notes

Added a updateAgentJarIntegrationsGolden to regenerate the expected-integrations.txt after intentional integration addition or removal.

The choice of having a separate file, is twofold:

  1. it's non trivial to get the instrumentation names in sources at this stage.
  2. the separate file is to prevent issues in the build system, so this data is not derived at "build time".

Github did not remove my earlier commit from #11684

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)
    • Get more information in this doc

Jira ticket: APMLP-1376

* Maintains the size check.
* Verify some required entries
* Ensure there's a minimum number of classes in the whole jar
* Ensure products are correctly included and have at least one class
* Light size check on the indexes
* Fixed list of packages that should not appear in the jar
* Run checks as part of the build job, to catch issues earlier
@bric3 bric3 requested a review from mcculls June 22, 2026 11:58
@datadog-datadog-prod-us1

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Jun 22, 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.96 s 13.85 s [+0.1%; +1.5%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.92 s 12.92 s [-0.9%; +0.7%] (no difference)
startup:petclinic:appsec:Agent 16.88 s 16.81 s [-0.5%; +1.2%] (no difference)
startup:petclinic:iast:Agent 16.89 s 16.90 s [-0.7%; +0.6%] (no difference)
startup:petclinic:profiling:Agent 16.76 s 16.91 s [-1.8%; +0.0%] (no difference)
startup:petclinic:sca:Agent 16.36 s 16.83 s [-7.1%; +1.6%] (no difference)
startup:petclinic:tracing:Agent 15.98 s 16.06 s [-1.3%; +0.3%] (no difference)

Commit: 58f8480f · 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 added tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels Jun 22, 2026
@bric3 bric3 changed the base branch from master to bdu/agent-jar-checks June 22, 2026 12:16
@bric3 bric3 requested a review from PerfectSlayer June 22, 2026 12:18
@bric3 bric3 marked this pull request as ready for review June 22, 2026 12:21
@bric3 bric3 requested review from a team as code owners June 22, 2026 12:21
@bric3 bric3 requested review from erikayasuda and removed request for a team June 22, 2026 12:21

@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: 2d06121966

ℹ️ 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 dd-java-agent/build.gradle
@bric3 bric3 force-pushed the bdu/agent-integrations-check branch from f708603 to 2b6fe35 Compare June 22, 2026 12:49
@bric3 bric3 requested review from a team as code owners June 22, 2026 12:49
@bric3 bric3 requested review from greghuels and sameerank and removed request for a team June 22, 2026 12:49
@bric3 bric3 requested review from ValentinZakharov, andreimatei, claponcet and manuel-alvarez-alvarez and removed request for a team June 22, 2026 12:49
Run `--list-integrations` on the assembled jar as part of check.
This exercises dd-java-agent.index, inst/instrumenter.index, and
integration class loading end-to-end.

The today's 208 integration names are stored in

`expected-integrations.txt`

and compared against the runtime output. Diff is shown on mismatch.
Run `updateAgentJarIntegrationsGolden` after intentional changes
and commit the result.
Multi-version integrations issues could be misreported as valid.

InstrumenterIndex.buildModule() logs ERROR and returns null when a
module fails to load, while the process exits 0. For integrations with
multiple versioned modules sharing one name (akka-http, vertx,
servlet...), if any of a versionned integration fails it's invisible.
This commit changes that.

In a clean run stderr is empty; any output indicates a module load
failure and fails the task immediately.
@bric3 bric3 force-pushed the bdu/agent-integrations-check branch from 5e6dfee to 0fb73ae Compare June 22, 2026 12:57
Base automatically changed from bdu/agent-jar-checks to master June 22, 2026 13:47

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

LGTM, but just curious if we want to track for new entries more aggressively?

Comment thread dd-java-agent/expected-integrations.txt
Comment thread dd-java-agent/build.gradle
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants