Skip to content

DADP-71 Add ADP point telemetry to Agent telemetry#50750

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits into
mainfrom
thieman/dadp-71-coat-point-telemetry
May 14, 2026
Merged

DADP-71 Add ADP point telemetry to Agent telemetry#50750
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits into
mainfrom
thieman/dadp-71-coat-point-telemetry

Conversation

@thieman
Copy link
Copy Markdown
Contributor

@thieman thieman commented May 13, 2026

Human Summary

We are working with a handful of design partners to start using the Agent Data Plane (ADP) to handle DogStatsD metrics in customer orgs. This will shift custom metric payloads from the core agent to ADP, which will then forward them along to the Datadog backend. This will affect the datadog.agent.point.sent and datadog.agent.point.dropped metrics which are currently sent both to the customer org and to Datadog via Cross-Org Agent Telemetry (COAT). These can be sourced from ADP via the Remote Agent Registry (RAR) and ADP's TelemetryProvider.

However, the sources of these two metrics will not be entirely shifted to ADP. Core Agent will still submit some points on its own from checks and other internal metrics such as datadog.agent.running. This presents a new functional requirement where we need to be able to merge both the Core Agent and ADP versions of these metrics before forwarding them along.

This PR does three things:

  1. Within the customer-facing telemetry check flow, "regular" metrics are now gathered. This includes RAR-sourced metrics from remote agents. Selected regular metrics (currently just these two) are merged into the existing "default" metric set before being forwarded.

  2. Within the internal COAT flow (agenttelemetry), we perform a similar merge. A big difference here is that agenttelemetry is already sourcing "regular" metrics, but previously there were no cases where a single metric came from both the core agent and RAR. Now that's supported and metrics are merged.

  3. The COAT versions of these two metrics are updated to include their domain and remote_agent tags. This will allow us to differentiate Core Agent traffic from ADP traffic for Datadog internal telemetry.

See DADP-71 for further rationale.

Rationale on Required Labels and QA Actions

This is my first Agent PR so it's entirely possible I misunderstood some of the intention behind these, but here's my first pass:

  • Applied changelog/no-changelog. This change is intended to maintain compatibility with existing behavior when enabling the Agent Data Plane, so user-facing functionality is unaffected. Datadog-internal COAT metrics have some tagging changes which does not seem changelog-worthy.
  • Applied qa/done. See this PR on Saluki, behavior was verified using differential tests comparing the Agent with and without Agent Data Plane enabled: feat(correctness): add agent telemetry correctness test saluki#1637
  • Applied need-change/agenttelemetry-governance and commented on existing governance card ASUP-31 pinging owner @carlosroman

Agentic Summary

What does this PR do?

Adds Core Agent support for ADP point telemetry from Remote Agent Registry in both Agent telemetry paths:

  • COAT preserves domain and remote_agent tags for point.sent / point.dropped by updating the default logs-and-metrics profile.
  • COAT coalesces compatible metric families gathered from the regular and default telemetry registries before profile aggregation. This prevents duplicate metric families with the same name, such as ADP point.sent and Core Agent point.sent, from overwriting each other in the Agent telemetry payload map.
  • The customer-facing telemetry core check merges allowlisted regular-registry metrics into the existing default telemetry output. Initially this covers point.sent and point.dropped, grouped by domain.
  • The customer-facing metric names and tag shape remain compatible:
    • datadog.agent.point.sent{domain:...}
    • datadog.agent.point.dropped{domain:...}
  • If gathering regular/RAR telemetry fails in the customer telemetry path, the check logs a warning and continues with Core Agent values only.

Motivation

DADP-71: when Agent Data Plane forwards metrics, Core Agent forwarder telemetry alone undercounts point.sent and point.dropped. ADP exposes equivalent point counts through RAR; Core Agent needs to include them in customer-facing Agent telemetry while preserving customer metric compatibility, and in COAT while retaining remote_agent attribution.

Describe how you validated your changes

  • dda inv install-tools
  • dda inv test --targets=./pkg/collector/corechecks/telemetry
  • dda inv test --targets=./comp/core/agenttelemetry/impl
  • dda inv test --targets=./comp/core/agenttelemetry/impl --test-run-name TestRun
  • Verified TestCoalescesDefaultAndNoDefaultMetricFamiliesBeforeAggregation fails without the COAT metric-family coalescing change and passes with it.

Additional Notes

The customer path intentionally keeps RAR/regular-registry metrics allowlisted. It does not expose arbitrary remote-agent telemetry to customer orgs.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@dd-octo-sts dd-octo-sts Bot added the internal Identify a non-fork PR label May 13, 2026
@github-actions github-actions Bot added the medium review PR review might take time label May 13, 2026
@thieman
Copy link
Copy Markdown
Contributor Author

thieman commented May 13, 2026

I have read the CLA Document and I hereby sign the CLA

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 13, 2026

Files inventory check summary

File checks results against ancestor a0e32982:

Results for datadog-agent_7.80.0~devel.git.796.ad45fbb.pipeline.113160850-1_amd64.deb:

No change detected

- name: point.dropped
aggregate_tags:
- domain
- remote_agent
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My understanding is these will change only the COAT version of the metrics to start including these two tags. Since COAT is internal, strict compatibility on the shape of these metrics is not required

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.

should not be a problem

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 13, 2026

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor a0e3298
📊 Static Quality Gates Dashboard
🔗 SQG Job

Successful checks

Info

Quality gate Change Size (prev → curr → max)
agent_deb_amd64 +12.06 KiB (0.00% increase) 743.419 → 743.430 → 750.800
agent_deb_amd64_fips +12.06 KiB (0.00% increase) 701.462 → 701.474 → 703.150
agent_heroku_amd64 +16.06 KiB (0.01% increase) 309.671 → 309.687 → 314.260
agent_rpm_amd64 +12.06 KiB (0.00% increase) 743.402 → 743.414 → 750.770
agent_rpm_amd64_fips +12.06 KiB (0.00% increase) 701.446 → 701.457 → 703.130
agent_rpm_arm64 +16.06 KiB (0.00% increase) 721.153 → 721.169 → 724.500
agent_rpm_arm64_fips +12.06 KiB (0.00% increase) 682.311 → 682.323 → 684.870
agent_suse_amd64 +12.06 KiB (0.00% increase) 743.402 → 743.414 → 750.770
agent_suse_amd64_fips +12.06 KiB (0.00% increase) 701.446 → 701.457 → 703.130
agent_suse_arm64 +16.06 KiB (0.00% increase) 721.153 → 721.169 → 724.500
agent_suse_arm64_fips +12.06 KiB (0.00% increase) 682.311 → 682.323 → 684.870
docker_agent_amd64 +12.06 KiB (0.00% increase) 803.576 → 803.588 → 806.340
docker_agent_arm64 +16.06 KiB (0.00% increase) 806.128 → 806.144 → 810.120
docker_agent_jmx_amd64 +12.06 KiB (0.00% increase) 994.496 → 994.508 → 997.060
docker_agent_jmx_arm64 +16.07 KiB (0.00% increase) 985.827 → 985.842 → 989.800
iot_agent_deb_amd64 +16.06 KiB (0.04% increase) 44.365 → 44.381 → 45.230
iot_agent_deb_arm64 +12.06 KiB (0.03% increase) 41.338 → 41.349 → 42.800
iot_agent_deb_armhf +12.03 KiB (0.03% increase) 42.043 → 42.055 → 42.960
iot_agent_rpm_amd64 +16.06 KiB (0.04% increase) 44.366 → 44.381 → 45.230
iot_agent_suse_amd64 +16.06 KiB (0.04% increase) 44.366 → 44.381 → 45.230
12 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
docker_cluster_agent_amd64 206.822 MiB
docker_cluster_agent_arm64 220.826 MiB
docker_cws_instrumentation_amd64 7.154 MiB
docker_cws_instrumentation_arm64 6.689 MiB
docker_dogstatsd_amd64 39.499 MiB
docker_dogstatsd_arm64 37.690 MiB
docker_host_profiler_amd64 302.240 MiB
docker_host_profiler_arm64 313.759 MiB
dogstatsd_deb_amd64 30.155 MiB
dogstatsd_deb_arm64 28.280 MiB
dogstatsd_rpm_amd64 30.155 MiB
dogstatsd_suse_amd64 30.155 MiB

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 13, 2026

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 13ace9ed-9b68-4652-9ec7-7a5d15db7fb7

Baseline: 6d04d3c
Comparison: c1e32e1
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization +4.10 [+1.12, +7.08] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization +4.10 [+1.12, +7.08] 1 Logs
otlp_ingest_metrics memory utilization +0.56 [+0.40, +0.73] 1 Logs
ddot_metrics_sum_delta memory utilization +0.56 [+0.36, +0.76] 1 Logs
quality_gate_logs % cpu utilization +0.40 [-0.60, +1.40] 1 Logs bounds checks dashboard
tcp_syslog_to_blackhole ingress throughput +0.28 [+0.10, +0.46] 1 Logs
ddot_logs memory utilization +0.23 [+0.17, +0.29] 1 Logs
quality_gate_idle memory utilization +0.12 [+0.06, +0.17] 1 Logs bounds checks dashboard
tcp_dd_logs_filter_exclude ingress throughput -0.01 [-0.10, +0.08] 1 Logs
uds_dogstatsd_to_api_v3 ingress throughput -0.01 [-0.22, +0.19] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.02 [-0.42, +0.39] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.02 [-0.46, +0.42] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.02 [-0.17, +0.13] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.04 [-0.25, +0.17] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.09 [-0.59, +0.41] 1 Logs
ddot_metrics_sum_cumulativetodelta_exporter memory utilization -0.10 [-0.33, +0.14] 1 Logs
ddot_metrics memory utilization -0.11 [-0.31, +0.09] 1 Logs
docker_containers_memory memory utilization -0.13 [-0.23, -0.03] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.13 [-0.18, -0.08] 1 Logs
quality_gate_idle_all_features memory utilization -0.21 [-0.26, -0.17] 1 Logs bounds checks dashboard
file_tree memory utilization -0.28 [-0.33, -0.23] 1 Logs
ddot_metrics_sum_cumulative memory utilization -0.41 [-0.57, -0.25] 1 Logs
quality_gate_metrics_logs memory utilization -0.45 [-0.70, -0.20] 1 Logs bounds checks dashboard
otlp_ingest_logs memory utilization -0.53 [-0.63, -0.43] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed observed_value links
docker_containers_cpu simple_check_run 10/10 684 ≥ 26
docker_containers_memory memory_usage 10/10 247.30MiB ≤ 370MiB
docker_containers_memory simple_check_run 10/10 727 ≥ 26
file_to_blackhole_0ms_latency memory_usage 10/10 0.16GiB ≤ 1.20GiB
file_to_blackhole_0ms_latency missed_bytes 10/10 0B = 0B
file_to_blackhole_1000ms_latency memory_usage 10/10 0.20GiB ≤ 1.20GiB
file_to_blackhole_1000ms_latency missed_bytes 10/10 0B = 0B
file_to_blackhole_100ms_latency memory_usage 10/10 0.17GiB ≤ 1.20GiB
file_to_blackhole_100ms_latency missed_bytes 10/10 0B = 0B
file_to_blackhole_500ms_latency memory_usage 10/10 0.18GiB ≤ 1.20GiB
file_to_blackhole_500ms_latency missed_bytes 10/10 0B = 0B
quality_gate_idle intake_connections 10/10 3 ≤ 4 bounds checks dashboard
quality_gate_idle memory_usage 10/10 144.69MiB ≤ 147MiB bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 3 ≤ 4 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 481.02MiB ≤ 495MiB bounds checks dashboard
quality_gate_logs intake_connections 10/10 3 ≤ 6 bounds checks dashboard
quality_gate_logs memory_usage 10/10 175.81MiB ≤ 195MiB bounds checks dashboard
quality_gate_logs missed_bytes 10/10 0B = 0B bounds checks dashboard
quality_gate_metrics_logs cpu_usage 10/10 343.77 ≤ 2000 bounds checks dashboard
quality_gate_metrics_logs intake_connections 10/10 3 ≤ 6 bounds checks dashboard
quality_gate_metrics_logs memory_usage 10/10 366.86MiB ≤ 430MiB bounds checks dashboard
quality_gate_metrics_logs missed_bytes 10/10 0B = 0B bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@datadog-datadog-prod-us1
Copy link
Copy Markdown
Contributor

datadog-datadog-prod-us1 Bot commented May 13, 2026

🎯 Code Coverage (details)
Patch Coverage: 76.84%
Overall Coverage: 50.11% (+0.19%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ad45fbb | Docs | Datadog PR Page | Give us feedback!

// do not prevent the customer-facing telemetry check from reporting Core Agent default telemetry values.
var regularMfs []*dto.MetricFamily
if gathered, err := c.telemetry.Gather(false); err != nil {
log.Warnf("failed to gather regular telemetry metrics for default telemetry merge: %v", err)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If this fails it could get pretty noisy as it would emit every 15 seconds, wondering if I should remove it or make it debug level?

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.

I would vouch for debug level

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.

I think if it is only every 15s it seems reasonable to me. The impact is that this telemetry is missing which is significant.

@thieman thieman added changelog/no-changelog No changelog entry needed qa/done QA done before merge and regressions are covered by tests need-change/agenttelemetry-governance Add this label if your change requires also a change in agent telemetry governance (internal) labels May 14, 2026
// Remote Agent Registry telemetry lives in the regular registry. Gather it on a best-effort basis so failures there
// do not prevent the customer-facing telemetry check from reporting Core Agent default telemetry values.
var regularMfs []*dto.MetricFamily
if gathered, err := c.telemetry.Gather(false); err != nil {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note that this will now call out to remote agents via RAR every 15 seconds (default interval on telemetry check). Per @tobz we do not expect this to be a significant runtime cost.

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.

But why is it important to change if it will be sent out only every 15m?

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.

COAT is emitted every 15m, but this PR also includes the telemetry in the point.sent / point.dropped that is sent to the customer's org where we want more frequent reporting.

@thieman thieman marked this pull request as ready for review May 14, 2026 11:02
@thieman thieman requested review from a team as code owners May 14, 2026 11:02
@thieman thieman requested a review from fabbing May 14, 2026 11:02
Copy link
Copy Markdown
Contributor

@jeremy-hanna jeremy-hanna left a comment

Choose a reason for hiding this comment

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

👍 for agent-runtime owned files

Copy link
Copy Markdown
Contributor

@iglendd iglendd left a comment

Choose a reason for hiding this comment

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

Looks good from comp/core/agenttelemetry perspective. One thing worth to reconsider and/or explain (or reach out offline), is increased frequency of polling metrics from remote registry, since it will be emitted every 15m it will be wasteful.

- name: point.dropped
aggregate_tags:
- domain
- remote_agent
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.

should not be a problem

// Remote Agent Registry telemetry lives in the regular registry. Gather it on a best-effort basis so failures there
// do not prevent the customer-facing telemetry check from reporting Core Agent default telemetry values.
var regularMfs []*dto.MetricFamily
if gathered, err := c.telemetry.Gather(false); err != nil {
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.

But why is it important to change if it will be sent out only every 15m?

// do not prevent the customer-facing telemetry check from reporting Core Agent default telemetry values.
var regularMfs []*dto.MetricFamily
if gathered, err := c.telemetry.Gather(false); err != nil {
log.Warnf("failed to gather regular telemetry metrics for default telemetry merge: %v", err)
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.

I would vouch for debug level


// coalesceMetricFamilies merges compatible metric families with the same name.
//
// The regular and default telemetry registries are gathered separately. Coalescing lets profile aggregation see all
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.

Interesting.

@jszwedko
Copy link
Copy Markdown
Contributor

Tested this out locally and observed:

  • point.sent making it to COAT with remote_agent and domain
  • point.sent ending up in the org the Agent was configured to send to

@jszwedko
Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 14, 2026

View all feedbacks in Devflow UI.

2026-05-14 19:39:43 UTC ℹ️ Start processing command /merge


2026-05-14 19:39:48 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 3h (p90).


2026-05-14 20:21:33 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit c1e32e1 into main May 14, 2026
246 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the thieman/dadp-71-coat-point-telemetry branch May 14, 2026 20:21
@github-actions github-actions Bot added this to the 7.80.0 milestone May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed internal Identify a non-fork PR medium review PR review might take time need-change/agenttelemetry-governance Add this label if your change requires also a change in agent telemetry governance (internal) qa/done QA done before merge and regressions are covered by tests team/agent-health team/agent-runtimes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants