Skip to content

Add test agent session token support - #12050

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
bbujon/smoke-tests-test-agent
Jul 30, 2026
Merged

Add test agent session token support#12050
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
bbujon/smoke-tests-test-agent

Conversation

@PerfectSlayer

@PerfectSlayer PerfectSlayer commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

This PR introduces an optional test agent session token for both trace and telemetry writers.

Motivation

The goal is to be able to reuse the existing test agent running in CI but having isolated session.
This will save running multiple test agents to avoid test pollution.

Additional Notes

This PR is part of improving smoke test capabilities.

Contributor Checklist

Jira ticket: APMLP-1247

@PerfectSlayer
PerfectSlayer requested review from a team as code owners July 23, 2026 09:00
@PerfectSlayer
PerfectSlayer requested review from dougqh and randomanderson and removed request for a team July 23, 2026 09:00
@PerfectSlayer PerfectSlayer changed the title Bbujon/smoke tests test agent Add test agent session token support Jul 23, 2026
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

@PerfectSlayer
PerfectSlayer force-pushed the bbujon/smoke-tests-test-agent branch from a9bceec to 6d68087 Compare July 23, 2026 09:07
@datadog-datadog-prod-us1

This comment has been minimized.

@PerfectSlayer PerfectSlayer added type: feature Enhancements and improvements comp: testing Testing labels Jul 23, 2026

@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 new session token is consistently read from DD_TEST_AGENT_SESSION_TOKEN and attached to trace-agent and agent-telemetry requests, while API-key-authenticated intake keeps its existing authentication path. No clear diff-only behavioral regression was identified; focused execution was blocked by the unavailable Gradle download and Java 25 toolchain.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 6d68087 · What is Autotest? · Any feedback? Reach out in #autotest

@dd-octo-sts

dd-octo-sts Bot commented Jul 23, 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.99 s 13.92 s [-0.4%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 12.86 s 12.98 s [-1.5%; -0.3%] (maybe better)
startup:petclinic:appsec:Agent 16.91 s 16.67 s [+0.5%; +2.3%] (maybe worse)
startup:petclinic:iast:Agent 16.83 s 17.00 s [-1.8%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 16.27 s 17.00 s [-8.4%; -0.2%] (maybe better)
startup:petclinic:sca:Agent 16.94 s 16.88 s [-0.7%; +1.4%] (no difference)
startup:petclinic:tracing:Agent 16.16 s 16.00 s [-0.1%; +2.1%] (no difference)

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

@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: 6d68087e16

ℹ️ 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 internal-api/src/main/java/datadog/trace/api/Config.java
Comment thread dd-trace-core/src/main/java/datadog/trace/common/writer/ddagent/DDAgentApi.java Outdated
Comment thread .gitlab-ci.yml

test_smoke:
extends: .test_job
extends: .test_job_with_test_agent

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use the session token when checking agent failures

After moving smoke jobs onto the test-agent template, validation still runs .gitlab/check_test_agent_results.sh, whose /test/trace_check/summary and /test/trace_check/failures calls do not pass DD_TEST_AGENT_SESSION_TOKEN. In the shared-agent scenario this feature is meant to support, those endpoints report all sessions when no token is supplied, so an unrelated session's trace-check failure can still fail this job despite the writer tagging its trace requests.

Useful? React with 👍 / 👎.

@PerfectSlayer
PerfectSlayer force-pushed the bbujon/smoke-tests-test-agent branch from 6d68087 to 775ec98 Compare July 23, 2026 11:02

@sarahchen6 sarahchen6 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!

@PerfectSlayer

Copy link
Copy Markdown
Contributor Author

/merge

@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 15:06:22 UTC ℹ️ Start processing command /merge


2026-07-29 15:06:26 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-07-29 15:34:25 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for a348549:

⚠️ 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.

@PerfectSlayer

Copy link
Copy Markdown
Contributor Author

/merge

@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 17:33:17 UTC ℹ️ Start processing command /merge


2026-07-29 17:33:22 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-07-29 17:44:37 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 6e7eb1a:

⚠️ 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.

@PerfectSlayer
PerfectSlayer force-pushed the bbujon/smoke-tests-test-agent branch from 775ec98 to 2edebf3 Compare July 30, 2026 04:16
@PerfectSlayer

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

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

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-30 04:24:16 UTC ℹ️ Start processing command /merge


2026-07-30 04:24:22 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-07-30 05:05:07 UTC ℹ️ MergeQueue: merge request added to the queue

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


2026-07-30 05:55:23 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit c00b484 into master Jul 30, 2026
586 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the bbujon/smoke-tests-test-agent branch July 30, 2026 05:55
@github-actions github-actions Bot added this to the 1.65.0 milestone Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testing Testing type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants