Skip to content

Agent integrations checks#11692

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
masterfrom
bdu/agent-integrations-check
Jun 24, 2026
Merged

Agent integrations checks#11692
gh-worker-dd-mergequeue-cf854d[bot] merged 5 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.94 s 13.99 s [-0.9%; +0.3%] (no difference)
startup:insecure-bank:tracing:Agent 12.94 s 13.10 s [-2.0%; -0.3%] (maybe better)
startup:petclinic:appsec:Agent 16.98 s 16.52 s [+1.8%; +3.8%] (significantly worse)
startup:petclinic:iast:Agent 17.03 s 16.96 s [-0.5%; +1.2%] (no difference)
startup:petclinic:profiling:Agent 16.76 s 17.11 s [-3.3%; -0.8%] (maybe better)
startup:petclinic:sca:Agent 17.02 s 16.98 s [-0.6%; +1.1%] (no difference)
startup:petclinic:tracing:Agent 16.02 s 15.69 s [-2.3%; +6.5%] (no difference)

Commit: 9b836ab1 · 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 a review from ValentinZakharov 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
Comment thread dd-java-agent/build.gradle Outdated
@bric3

bric3 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jun 24, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-06-24 13:14:37 UTC ℹ️ Start processing command /merge


2026-06-24 13:14:43 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-06-24 14:12:10 UTC ℹ️ MergeQueue: merge request added to the queue

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


2026-06-24 15:25:34 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 6ec6716 into master Jun 24, 2026
582 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the bdu/agent-integrations-check branch June 24, 2026 15:25
@github-actions github-actions Bot added this to the 1.64.0 milestone Jun 24, 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: no release notes Changes to exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants