Skip to content

fix(core): support cmd_port configuration#1648

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
matt.briggs/issue-1645
May 13, 2026
Merged

fix(core): support cmd_port configuration#1648
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
matt.briggs/issue-1645

Conversation

@webern
Copy link
Copy Markdown
Contributor

@webern webern commented May 13, 2026

Summary

When cmd_port is set to a non-default value in datadog.yaml, ADP now reads it and connects to the correct Agent IPC port instead of the hardcoded default 5001.

cmd_port takes precedence over agent_ipc_endpoint when both are set. The endpoint is resolved at call time in
RemoteAgentClientConfiguration::endpoint().

Adds an integration test named adp-cmd-port.

Change Type

  • Bug fix
  • New feature

How did you test this PR?

New integration test.

References

Closes #1645

@webern webern requested a review from a team as a code owner May 13, 2026 19:31
@dd-octo-sts dd-octo-sts Bot added area/components Sources, transforms, and destinations. area/docs Reference documentation. area/test All things testing: unit/integration, correctness, SMP regression, etc. labels May 13, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 13, 2026

Binary Size Analysis (Agent Data Plane)

Target: 65e22e8 (baseline) vs bd44747 (comparison) diff
Analysis Type: Stripped binaries (debug symbols excluded)
Baseline Size: 37.82 MiB
Comparison Size: 37.83 MiB
Size Change: +4.44 KiB (+0.01%)
Pass/Fail Threshold: +5%
Result: PASSED ✅

Changes by Module

Module File Size Symbols
anyhow +7.20 KiB 213
agent_data_plane::internal::env +6.73 KiB 8
serde_core +5.35 KiB 39
agent_data_plane::cli::run -5.28 KiB 3
prost +5.12 KiB 39
datadog_protos::agent_include::datadog -4.67 KiB 15
core -4.59 KiB 828
anon.7be77364b2cdf5e5c03d159c6b1987e4.89.llvm.3318723889602329747 +3.64 KiB 1
anon.05044b273a7e4a8d31259722e79fc658.47.llvm.15667338004991869279 -3.64 KiB 1
datadog_agent_commons::ipc::client -3.23 KiB 6
[Unmapped] -2.78 KiB 1
[sections] -2.58 KiB 7
figment +2.56 KiB 33
alloc -2.55 KiB 33
anon.87a2297166168b76c5f1c8108bafdda1.185.llvm.13166977885946176876 -2.02 KiB 1
anon.6d21e526c2fa71538e7f35aceb55356c.133.llvm.14999123421166486080 +2.02 KiB 1
http +1.97 KiB 13
anon.f4a4d7929bfefaa651e3226fa8b73b92.73.llvm.17518122362303660564 +1.33 KiB 1
anon.2b92b43974578b84151e0f84413bdd4c.42.llvm.17568915320350933959 -1.24 KiB 1
anon.84900be1ab6f3eca8ebaa12de8b168ee.366.llvm.12299157744426248598 +1.22 KiB 1

Detailed Symbol Changes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +101% +19.4Ki  +102% +19.3Ki    agent_data_plane::internal::env::workload::build_collector::_{{closure}}::h9a138921739c9fec
  +104% +16.8Ki  +104% +16.8Ki    agent_data_plane::internal::env::ADPEnvironmentProvider::from_configuration::_{{closure}}::hbae72b2caa5b8ec4
  [NEW] +14.5Ki  [NEW] +14.4Ki    _<backon::retry::Retry<B,T,E,Fut,FutureFn,SF$C&C$NF,AF> as core::future::future::Future>::poll::h5a78146449c23d94
  +568% +4.55Ki  +656% +4.55Ki    alloc::collections::btree::map::BTreeMap<K,V,A>::insert::hc2d9aa1289ff4bd3
  +567% +4.40Ki  +659% +4.40Ki    alloc::collections::btree::map::BTreeMap<K,V,A>::insert::h31b894476c54be3b
  [NEW] +3.91Ki  [NEW] +2.92Ki    core::ptr::drop_in_place<backon::retry::Retry<backon::backoff::constant::ConstantBackoff,tonic::service::interceptor::InterceptedService<tonic::transport::channel::Channel,datadog_agent_commons::ipc::client::bearer_auth::BearerAuthInterceptor>,anyhow::Error,datadog_agent_commons::ipc::client::RemoteAgentClient::from_configuration::{{closure}}::{{closure}}::{{closure}},datadog_agent_commons::ipc::client::RemoteAgentClient::from_configuration::{{closure}}::{{closure}},backon::sleep::TokioSleeper,fn$LP$&anyhow::Error$RP$ .> bool,datadog_agent_commons::ipc::client::RemoteAgentClient::from_configuration::{{closure}}::{{closure}},fn$LP$&anyhow::Error,core::option::Option<core::time::Duration>$RP$ .> core::option::Option<core::time::Duration>>>::h5a2a7ac2d9e33c20
  [NEW] +3.64Ki  [NEW]     +16    anon.7be77364b2cdf5e5c03d159c6b1987e4.89.llvm.3318723889602329747
  +841% +3.34Ki +10e2% +3.34Ki    prost::encoding::merge_loop::hd552862d292b1917
  +226% +3.15Ki  [ = ]       0    core::ptr::drop_in_place<http_body_util::combinators::map_err::MapErr<http_body_util::combinators::map_err::MapErr<http_body_util::combinators::map_frame::MapFrame<tonic::service::interceptor::ResponseBody<tonic::body::Body>,tonic::codec::decode::Streaming<datadog_protos::agent_include::datadog::workloadmeta::WorkloadmetaStreamResponse>::new<tonic::service::interceptor::ResponseBody<tonic::body::Body>,tonic_prost::codec::ProstDecoder<datadog_protos::agent_include::datadog::workloadmeta::WorkloadmetaStreamResponse>>::{{closure}}>,tonic::codec::decode::Streaming<datadog_protos::agent_include::datadog::workloadmeta::WorkloadmetaStreamResponse>::new<tonic::service::interceptor::ResponseBody<tonic::body::Body>,tonic_prost::codec::ProstDecoder<datadog_protos::agent_include::datadog::workloadmeta::WorkloadmetaStreamResponse>>::{{closure}}>,tonic::status::Status::map_error<tonic::status::Status>$GT
  +238% +2.88Ki  [ = ]       0    core::ptr::drop_in_place<http_body_util::combinators::map_err::MapErr<http_body_util::combinators::map_frame::MapFrame<tonic::service::interceptor::ResponseBody<tonic::body::Body>,tonic::codec::decode::Streaming<datadog_protos::agent_include::datadog::model::v1::ConfigEvent>::new<tonic::service::interceptor::ResponseBody<tonic::body::Body>,tonic_prost::codec::ProstDecoder<datadog_protos::agent_include::datadog::model::v1::ConfigEvent>>::{{closure}}>,tonic::codec::decode::Streaming<datadog_protos::agent_include::datadog::model::v1::ConfigEvent>::new<tonic::service::interceptor::ResponseBody<tonic::body::Body>,tonic_prost::codec::ProstDecoder<datadog_protos::agent_include::datadog::model::v1::ConfigEvent>>::{{closure}}>>::h1e2ae73d10a7b11f
  +0.1% +2.29Ki  -0.0% -1.28Ki    [4127 Others]
  [DEL] -2.34Ki  [DEL] -1.92Ki    _<hyper_timeout::TimeoutConnector<T> as tower_service::Service<http::uri::Uri>>::call::_{{closure}}::hf03b51a496e3d39c
 -43.1% -2.78Ki  [ = ]       0    [Unmapped]
  [DEL] -2.92Ki  [DEL] -2.75Ki    _<datadog_protos::agent_include::datadog::autodiscovery::Config as prost::message::Message>::merge_field::hc4348a08c568c2e9
  [DEL] -3.64Ki  [DEL]     -16    anon.05044b273a7e4a8d31259722e79fc658.47.llvm.15667338004991869279
  [DEL] -3.85Ki  [DEL] -2.86Ki    core::ptr::drop_in_place<backon::retry::Retry<backon::backoff::constant::ConstantBackoff,tonic::service::interceptor::InterceptedService<tonic::transport::channel::Channel,datadog_agent_commons::ipc::client::bearer_auth::BearerAuthInterceptor>,anyhow::Error,datadog_agent_commons::ipc::client::RemoteAgentClient::from_configuration::{{closure}}::{{closure}}::{{closure}},datadog_agent_commons::ipc::client::RemoteAgentClient::from_configuration::{{closure}}::{{closure}},backon::sleep::TokioSleeper,fn$LP$&anyhow::Error$RP$ .> bool,datadog_agent_commons::ipc::client::RemoteAgentClient::from_configuration::{{closure}}::{{closure}},fn$LP$&anyhow::Error,core::option::Option<core::time::Duration>$RP$ .> core::option::Option<core::time::Duration>>>::hce20edb9031fa6b1
  [DEL] -4.89Ki  [DEL] -4.59Ki    alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Mut,K,V,alloc::collections::btree::node::marker::Leaf>,alloc::collections::btree::node::marker::Edge>::insert_recursing::hffe2f051523f88f2
  [DEL] -5.05Ki  [DEL] -4.75Ki    alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Mut,K,V,alloc::collections::btree::node::marker::Leaf>,alloc::collections::btree::node::marker::Edge>::insert_recursing::h828ebe9945b56d69
  -3.6% -5.31Ki  -3.6% -5.31Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::haf0764c1bab35be1
  [DEL] -14.3Ki  [DEL] -14.1Ki    _<backon::retry::Retry<B,T,E,Fut,FutureFn,SF$C&C$NF,AF> as core::future::future::Future>::poll::h10ab70c415d098f0
 -51.3% -29.4Ki -51.4% -29.4Ki    agent_data_plane::internal::env::workload::RemoteAgentWorkloadProvider::from_configuration::_{{closure}}::h2eb61ab2f373fb14
  +0.0% +4.44Ki  -0.0% -1.21Ki    TOTAL

When cmd_port is set to a non-default value in datadog.yaml, ADP
now reads it and connects to the correct Agent IPC port instead of
the hardcoded default 5001.

cmd_port takes precedence over agent_ipc_endpoint when both are
set. The endpoint is resolved at call time in
RemoteAgentClientConfiguration::endpoint().

Adds an integration test named adp-cmd-port.
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 13, 2026

Regression Detector (Agent Data Plane)

Run ID: 79c19116-7ef7-40d9-aa46-ba5ce7f25d6a
Baseline: 65e22e88 · Comparison: bd447476 · Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (35)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
dsd_uds_10mb_3k_contexts_cpu (erratic) cpu ⚪ +4.71 metrics profiles logs
otlp_ingest_logs_5mb_memory (ignored) memory ⚪ +3.72 metrics profiles logs
dsd_uds_500mb_3k_contexts_throughput throughput ⚪ -1.75 metrics profiles logs
otlp_ingest_metrics_5mb_cpu (erratic) cpu ⚪ +0.96 metrics profiles logs
dsd_uds_100mb_3k_contexts_cpu (erratic) cpu ⚪ +0.77 metrics profiles logs
quality_gates_rss_idle memory ⚪ +0.71 metrics profiles logs
dsd_uds_512kb_3k_contexts_memory memory ⚪ +0.49 metrics profiles logs
dsd_uds_500mb_3k_contexts_memory memory ⚪ +0.45 metrics profiles logs
dsd_uds_1mb_3k_contexts_memory memory ⚪ +0.33 metrics profiles logs
otlp_ingest_logs_5mb_cpu (ignored) cpu ⚪ +0.29 metrics profiles logs
dsd_uds_10mb_3k_contexts_memory memory ⚪ +0.18 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ +0.13 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_throughput throughput ⚪ -0.11 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_memory memory ⚪ +0.11 metrics profiles logs
otlp_ingest_traces_5mb_memory memory ⚪ +0.10 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ +0.08 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ +0.06 metrics profiles logs
otlp_ingest_logs_5mb_throughput (ignored) throughput ⚪ -0.03 metrics profiles logs
dsd_uds_100mb_3k_contexts_throughput throughput ⚪ -0.01 metrics profiles logs
dsd_uds_512kb_3k_contexts_throughput throughput ⚪ -0.01 metrics profiles logs
dsd_uds_100mb_3k_contexts_memory memory ⚪ +0.00 metrics profiles logs
otlp_ingest_metrics_5mb_throughput throughput ⚪ -0.00 metrics profiles logs
dsd_uds_10mb_3k_contexts_throughput throughput ⚪ -0.00 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.00 metrics profiles logs
dsd_uds_1mb_3k_contexts_throughput throughput ⚪ +0.00 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_memory memory ⚪ -0.23 metrics profiles logs
dsd_uds_500mb_3k_contexts_cpu (erratic) cpu ⚪ -0.32 metrics profiles logs
otlp_ingest_traces_5mb_cpu (erratic) cpu ⚪ -0.68 metrics profiles logs
otlp_ingest_traces_5mb_throughput throughput ⚪ +0.74 metrics profiles logs
otlp_ingest_metrics_5mb_memory memory ⚪ -1.22 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_throughput throughput ⚪ +1.73 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_cpu (erratic) cpu ⚪ -1.87 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_cpu (erratic) cpu ⚪ -3.41 metrics profiles logs
dsd_uds_512kb_3k_contexts_cpu (erratic) cpu 🟢 -6.13 metrics profiles logs
dsd_uds_1mb_3k_contexts_cpu (erratic) cpu 🟢 -7.43 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 122 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 39.6 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 59.8 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 178 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 27.1 MiB ≤ 40 MiB metrics profiles logs
Explanation

A change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression.

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit fb3fdf0 into main May 13, 2026
76 checks passed
dd-octo-sts Bot pushed a commit that referenced this pull request May 13, 2026
## Summary

When cmd_port is set to a non-default value in datadog.yaml, ADP now reads it and connects to the correct Agent IPC port instead of the hardcoded default 5001.

cmd_port takes precedence over agent_ipc_endpoint when both are set. The endpoint is resolved at call time in
RemoteAgentClientConfiguration::endpoint().

Adds an integration test named adp-cmd-port.

## Change Type
- [x] Bug fix
- [x] New feature

## How did you test this PR?

New integration test.

## References

Closes #1645

Co-authored-by: toby.lawrence <toby.lawrence@datadoghq.com> fb3fdf0
@webern webern deleted the matt.briggs/issue-1645 branch May 13, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/components Sources, transforms, and destinations. area/docs Reference documentation. area/test All things testing: unit/integration, correctness, SMP regression, etc. mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correctly support cmd_port.

2 participants