[SDTEST-3873] Add internal telemetry metrics - #115
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: e2362f3 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a58d07e15
ℹ️ 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".
There was a problem hiding this comment.
More details
The telemetry transport, aggregation and restoration paths behaved correctly across Agent and agentless routing, retries, cancellation, malformed configuration, concurrent submissions, and realistic metric payload shapes. No production-impacting regression was reproducible; lint remains unverified because the installed golangci-lint binary targets Go 1.24 while the repository targets Go 1.26.3.
📊 Validated against 10 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 6a58d07 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16e13e7291
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2362f36b3
ℹ️ 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".
E2E Test Report: ISSUES FOUND ❌Tested by: Shepherd Agent (autonomous QA for Datadog Test Optimization) Test Environment
Results
Issues Found
Verification
Test Methodology
This E2E test was performed by Shepherd — autonomous QA for Datadog Test Optimization. |
What
internal/telemetrypackage based on the CI Visibility telemetry implementation indd-trace-go.message-batchrequest type when both are present.app-started, lifecycle, configuration, dependency, integration, log, or heartbeat events.DD_ENV, the ddtest build version, and the constant language nameddtest./telemetry/proxy/api/v2/apmtelemetryand supports HTTP(S) and Unix-socket Agent URLs.DD_SITE, orDD_CIVISIBILITY_AGENTLESS_URLwhen a test intake override is configured.internal/httptransport, then reused it from both Test Optimization and telemetry to keep Agent URL, Unix socket, site, API key, and agentless test URL handling consistent.planortestcommand, passed the same client through the runner, planner, Test Optimization API transport, and Git command runner, and flushed it after the command completes. Client creation and flush failures remain best-effort and do not replace the command result.dd-trace-gonames and tags where they apply to ddtest:itr_skippedcounts tagged asevent_type:testorevent_type:suite. ddtest does not emititr_unskippableoritr_forced_run.Why
ddtest performs Test Optimization API requests, repository uploads, TIA planning, and supporting Git operations in its own process. Those operations need internal CI Visibility metrics so their volume, latency, response sizes, and failures can be monitored independently of the language tracer running the tests.
The implementation intentionally copies only the metrics functionality needed by ddtest. It uses the optional telemetry
message-batchenvelope to avoid duplicating the common request header when flushing both count and distribution payloads, while excluding unrelated application lifecycle events.Sharing connection discovery with the existing Test Optimization transport also prevents the telemetry and API clients from resolving Agent, Unix-socket, site, API-key, and test-intake configuration differently.
E2E testing
make testsuccessfully.make lintsuccessfully with zero issues.DD_CIVISIBILITY_AGENTLESS_ENABLED=true,DD_API_KEY=test,DD_CIVISIBILITY_AGENTLESS_URL=http://127.0.0.1:<port>,DD_SERVICE=<service>, andDD_ENV=e2e.go run . planin a supported test project./api/v2/apmtelemetry, useslanguage_name: ddtestand the configured service, contains onlygenerate-metrics/distributionspayloads (wrapped inmessage-batchwhen both exist), and includes the expected API, ITR, and Git metrics.