Skip to content

Fix tests using precompiled MyResource class - #12603

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
jpbempel/fix-myresource-tests
Sep 24, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
jpbempel/fix-myresource-tests

Conversation

@jpbempel

@jpbempel jpbempel commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

What Does This Do

instead of loading a precompiled and preinstrumented class, we are compiling and instrumenting with JAX-RS instrumentation on-the-fly. Add InstrumentationTestHelper.installTracerInstrumentation(), which self-attaches and applies the real JAX-RS InstrumenterModule via AgentInstaller
Modify CapturedSnapshotTest.tracerInstrumentedClass and MetricProbesInstrumentationTest.localVarNotInScope

Motivation

Additional Notes

Contributor Checklist

Jira ticket: DEBUG-6226

@jpbempel
jpbempel requested review from a team as code owners September 22, 2026 15:00

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

⚠️ Autotest was unable to start this review.

Please try again by commenting @autotest review.

@dd-octo-sts

dd-octo-sts Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@jpbempel jpbempel added comp: debugger Dynamic Instrumentation type: refactoring tag: no release notes Changes to exclude from release notes labels Sep 22, 2026

@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: 89f4c525a4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread dd-java-agent/agent-debugger/build.gradle Outdated
@datadog-official

This comment has been minimized.

@pr-commenter

pr-commenter Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1790227387 1790227704
end_time 2026-09-24T05:24:38 2026-09-24T05:29:54
git_branch master jpbempel/fix-myresource-tests
git_commit_sha 960f771 7aa786f
start_time 2026-09-24T05:23:08 2026-09-24T05:28:25
See matching parameters
Baseline Candidate
ci_job_id 2074960390 2074960390
ci_pipeline_id 139701847 139701847
cpu_model Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
git_commit_date 1790226735 1790226735

Summary

Found 0 performance improvements and 6 performance regressions! Performance is the same for 3 metrics, 6 unstable metrics.

scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:basic worse
[+3.522µs; +21.010µs] or [+1.152%; +6.871%]
unsure
[+2.693µs; +20.273µs] or [+0.812%; +6.113%]
unsure
[+2.563µs; +19.631µs] or [+0.750%; +5.748%]
unstable
[-27.776µs; +235.193µs] or [-2.999%; +25.393%]
unstable
[-228.666op/s; +21.948op/s] or [-9.833%; +0.944%]
scenario:loop worse
[+475.272µs; +571.156µs] or [+6.312%; +7.586%]
worse
[+477.024µs; +574.943µs] or [+6.286%; +7.576%]
worse
[+477.859µs; +576.428µs] or [+6.264%; +7.556%]
worse
[+469.253µs; +600.482µs] or [+6.076%; +7.775%]
worse
[-10.242op/s; -5.399op/s] or [-7.937%; -4.184%]
See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-31.928µs; +10.062µs] or [-9.433%; +2.973%]
unstable
[-49.624µs; +15.334µs] or [-13.183%; +4.074%]
unstable
[-61.307µs; +19.371µs] or [-15.575%; +4.921%]
unstable
[-4.305µs; +224.143µs] or [-0.425%; +22.152%]
same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (376.426 µs) : 342, 411
.   : milestone, 376,
basic (331.644 µs) : 321, 342
.   : milestone, 332,
loop (7.589 ms) : 7581, 7597
.   : milestone, 7589,
section candidate
noprobe (359.281 µs) : 332, 386
.   : milestone, 359,
basic (343.127 µs) : 337, 349
.   : milestone, 343,
loop (8.115 ms) : 8051, 8179
.   : milestone, 8115,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 376.426 µs [342.019 µs, 410.833 µs]
basic 331.644 µs [321.115 µs, 342.174 µs]
loop 7.589 ms [7.581 ms, 7.597 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 359.281 µs [332.483 µs, 386.08 µs]
basic 343.127 µs [337.177 µs, 349.078 µs]
loop 8.115 ms [8.051 ms, 8.179 ms]

@dd-octo-sts

dd-octo-sts Bot commented Sep 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 14.76 s 14.70 s [-0.5%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 13.64 s 13.71 s [-1.3%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 17.03 s 16.90 s [+0.0%; +1.5%] (maybe worse)
startup:petclinic:iast:Agent 16.93 s 16.95 s [-0.9%; +0.7%] (no difference)
startup:petclinic:profiling:Agent 16.50 s 16.88 s [-3.5%; -1.0%] (maybe better)
startup:petclinic:sca:Agent 16.92 s 16.04 s [+1.1%; +9.9%] (significantly worse)
startup:petclinic:tracing:Agent 16.27 s 16.27 s [-0.7%; +0.7%] (no difference)

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

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

🤖 Generated with Claude Code

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

Overall, looks reasonable to me.
I see there are some bot comments, and Claude found a small issue when I asked it to review. I'll leave those to your discretion to address.

instead of loading a precompiled and preinstrumented class, we are
compiling and instrumenting with JAX-RS instrumentation on-the-fly.
Add InstrumentationTestHelper.installTracerInstrumentation(), which
self-attaches and applies the real JAX-RS InstrumenterModule via
AgentInstaller
Modify CapturedSnapshotTest.tracerInstrumentedClass and
MetricProbesInstrumentationTest.localVarNotInScope
use jax-rs 2 api
@jpbempel
jpbempel force-pushed the jpbempel/fix-myresource-tests branch from f63eb41 to 7aa786f Compare September 24, 2026 05:12
@jpbempel
jpbempel requested review from a team and dudikeleti and removed request for a team September 24, 2026 07:01

@datadog-official datadog-official 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 helper removes the JAX-RS transformer after each affected test. Later tests do not receive this transformer.

Was this helpful? React 👍 or 👎

Open Bits AI session

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

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit be15652 into master Sep 24, 2026
613 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the jpbempel/fix-myresource-tests branch September 24, 2026 10:31
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: debugger Dynamic Instrumentation tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants