Skip to content

Test async RUM timer propagation as application code - #12502

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
andrea.marziali/diag-fix-tomcat-async-rum
Sep 18, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
andrea.marziali/diag-fix-tomcat-async-rum

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

Moves the asynchronous RUM servlet fixture from the agent-reserved datadog.trace.* namespace to the application-like test.servlet5 namespace.

The fixture schedules response work through a TimerTask. Generic task instrumentation deliberately excludes agent-owned classes under datadog.trace.*, so the fixture’s task captured a continuation when
scheduled but was not instrumented when executed.

Moving it to an application namespace makes the test exercise the same propagation path as a real servlet application.

flowchart TD
    subgraph Before
        A1[Servlet schedules TimerTask] --> B1[Capture request continuation]
        B1 --> C1[Task class is under datadog.trace.*]
        C1 --> D1[Generic Runnable instrumentation excludes it]
        D1 --> E1[Continuation is never resumed]
    end

    subgraph After
        A2[Servlet schedules TimerTask] --> B2[Capture request continuation]
        B2 --> C2[Task class is under test.servlet5]
        C2 --> D2[Generic Runnable instrumentation applies]
        D2 --> E2[Resume and close continuation]
        E2 --> F2[Complete async response]
    end
Loading

Why?

The servlet is a test application fixture, not agent implementation code. Keeping it under the reserved agent namespace made the test unrepresentative and bypassed the instrumentation it was intended to verify.

This change fixes the fixture rather than weakening continuation diagnostics or adding a special case for the test.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali amarziali added type: bug fix Bug fix comp: testing Testing tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM tag: override groovy enforcement Override the "Enforce Groovy Migration" check labels Sep 15, 2026
@amarziali
amarziali requested a review from a team as a code owner September 15, 2026 10:29
@amarziali
amarziali requested review from jordan-wong and removed request for a team September 15, 2026 10:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 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-15T10:32:13.327383Z 2516df5 PR opened
🔒 Security Review Completed 2026-09-15T10:32:21.382392Z 2516df5 PR opened
ℹ️ 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.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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 package move matches all changed imports. It lets generic task instrumentation cover the async fixture as intended.

Was this helpful? React 👍 or 👎

Open Bits AI session

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

@datadog-datadog-prod-us1

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 15, 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.78 s 14.65 s [+0.1%; +1.7%] (maybe worse)
startup:insecure-bank:tracing:Agent 13.63 s 13.70 s [-1.3%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 16.50 s 16.10 s [-3.6%; +8.6%] (unstable)
startup:petclinic:iast:Agent 16.87 s 16.91 s [-1.3%; +0.8%] (no difference)
startup:petclinic:profiling:Agent 16.63 s 16.63 s [-1.0%; +0.9%] (no difference)
startup:petclinic:sca:Agent 16.95 s 16.63 s [+0.9%; +3.0%] (maybe worse)
startup:petclinic:tracing:Agent 16.04 s 16.22 s [-2.1%; -0.2%] (maybe better)

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

@jordan-wong jordan-wong 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

@amarziali

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 18, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-18 07:09:05 UTC ℹ️ Start processing command /merge


2026-09-18 07:09:10 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-18 07:36:30 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 0cf5101:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@amarziali

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 18, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-18 07:36:51 UTC ℹ️ Start processing command /merge


2026-09-18 07:36:56 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-18 08:40:03 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit cf8ea07 into master Sep 18, 2026
609 of 616 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the andrea.marziali/diag-fix-tomcat-async-rum branch September 18, 2026 08:40
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testing Testing tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes tag: override groovy enforcement Override the "Enforce Groovy Migration" check type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants