Skip to content

Add test agent session token support#12050

Open
PerfectSlayer wants to merge 2 commits into
masterfrom
bbujon/smoke-tests-test-agent
Open

Add test agent session token support#12050
PerfectSlayer wants to merge 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

Bits has a CI fix ready

Warning

This comment is related to an earlier commit.

🟢 Investigated · 🟢 Fix prepared · ⚪ Validation skipped · 🟠 Ready

Added the formatter-required blank lines around X_DATADOG_TEST_SESSION_TOKEN in dd-trace-core/src/main/java/datadog/trace/common/writer/ddagent/DDAgentApi.java.

Commit fix to this PR


View in Datadog | Reviewed commit a9bceec · Any feedback? Reach out in #deveng-pr-agent

@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.91 s [-0.2%; +1.3%] (no difference)
startup:insecure-bank:tracing:Agent 12.94 s 13.06 s [-2.0%; +0.0%] (no difference)
startup:petclinic:appsec:Agent 16.98 s 16.82 s [-0.1%; +2.0%] (no difference)
startup:petclinic:iast:Agent 16.48 s 16.90 s [-6.8%; +1.7%] (no difference)
startup:petclinic:profiling:Agent 16.71 s 16.89 s [-2.3%; +0.2%] (no difference)
startup:petclinic:sca:Agent 16.45 s 16.99 s [-7.5%; +1.2%] (no difference)
startup:petclinic:tracing:Agent 16.08 s 16.25 s [-2.0%; -0.2%] (maybe better)

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

1 participant