chore(env): create datadog-agent-commons crate for Agent-specific shared code#1602
Conversation
Binary Size Analysis (Agent Data Plane)Target: bc61ae9 (baseline) vs 2d21ae4 (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
agent_data_plane::internal::env |
+182.08 KiB | 101 |
saluki_env::workload::providers |
-105.11 KiB | 10 |
figment |
-81.35 KiB | 572 |
datadog_agent_commons::ipc::client |
+64.56 KiB | 13 |
saluki_env::helpers::remote_agent |
-61.64 KiB | 14 |
alloc |
+59.02 KiB | 2519 |
saluki_env::workload::collectors |
-49.32 KiB | 164 |
hyper_util |
+47.90 KiB | 199 |
serde_yaml |
+46.33 KiB | 73 |
unsafe_libyaml |
+38.72 KiB | 29 |
core |
+37.36 KiB | 15277 |
hyper |
-36.89 KiB | 717 |
tokio |
+22.80 KiB | 5127 |
anyhow |
-21.53 KiB | 1624 |
serde_with |
-21.25 KiB | 72 |
hashbrown |
+19.41 KiB | 1133 |
otlp_protos::otlp_include::opentelemetry |
-18.75 KiB | 224 |
saluki_components::common::datadog |
+16.65 KiB | 371 |
prost |
+16.61 KiB | 492 |
chrono |
+16.24 KiB | 26 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
+1.2% +258Ki +1.2% +211Ki [49342 Others]
[NEW] +149Ki [NEW] +148Ki agent_data_plane::cli::run::handle_run_command::_{{closure}}::hb7464f7af4d24ea5
[NEW] +68.5Ki [NEW] +68.3Ki agent_data_plane::run_inner::_{{closure}}::h68d69d8d2f81b015
[NEW] +67.8Ki [NEW] +67.7Ki agent_data_plane::cli::run::create_topology::_{{closure}}::h8306361c3a8196a7
[NEW] +65.3Ki [NEW] +65.2Ki saluki_core::topology::built::BuiltTopology::spawn::_{{closure}}::hfe4e49dc39ce9611
[NEW] +57.8Ki [NEW] +57.6Ki agent_data_plane::cli::debug::handle_debug_command::_{{closure}}::h0ed7607555d0bcb5
[NEW] +57.5Ki [NEW] +57.3Ki saluki_core::topology::blueprint::TopologyBlueprint::build::_{{closure}}::had0b207dfcbdcafd
[NEW] +57.1Ki [NEW] +56.9Ki agent_data_plane::internal::env::workload::RemoteAgentWorkloadProvider::from_configuration::_{{closure}}::hb209e94acf70a176
[NEW] +50.8Ki [NEW] +50.6Ki _<saluki_components::transforms::apm_stats::ApmStats as saluki_core::components::transforms::Transform>::run::_{{closure}}::h551f251efb552aa8
[NEW] +40.9Ki [NEW] +40.7Ki _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::hf749901e3f62a255
[NEW] +40.0Ki [NEW] +39.8Ki saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h3fa81e80eab31300
[DEL] -41.0Ki [DEL] -40.8Ki _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h1bb8d646569bc30e
[DEL] -44.5Ki [DEL] -44.3Ki _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::h1baf53f0a27caf99
[DEL] -49.6Ki [DEL] -49.4Ki _<saluki_components::transforms::apm_stats::ApmStats as saluki_core::components::transforms::Transform>::run::_{{closure}}::h9eaed642fde8076b
[DEL] -57.5Ki [DEL] -57.4Ki saluki_core::topology::blueprint::TopologyBlueprint::build::_{{closure}}::h5bf8b481e91d3cf2
[DEL] -57.6Ki [DEL] -57.4Ki agent_data_plane::cli::debug::handle_debug_command::_{{closure}}::h6f1710360d926a91
[DEL] -64.9Ki [DEL] -64.7Ki saluki_core::topology::built::BuiltTopology::spawn::_{{closure}}::h2757e3b25873956f
[DEL] -67.2Ki [DEL] -67.0Ki agent_data_plane::cli::run::create_topology::_{{closure}}::h264ca2385ebef6f2
[DEL] -69.9Ki [DEL] -69.7Ki agent_data_plane::run_inner::_{{closure}}::hea2335eebab44bfd
[DEL] -85.9Ki [DEL] -85.7Ki saluki_env::workload::providers::remote_agent::RemoteAgentWorkloadProvider::from_configuration::_{{closure}}::h9b1aa6330ab3f6f1
[DEL] -149Ki [DEL] -149Ki agent_data_plane::cli::run::handle_run_command::_{{closure}}::hc4b614f155e62c55
+0.6% +225Ki +0.6% +178Ki TOTAL
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 533382ca5b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| .collect(); | ||
|
|
||
| let (sender, _) = broadcast::channel::<AutodiscoveryEvent>(super::AD_STREAM_CAPACITY); | ||
| let (sender, _) = broadcast::channel::<AutodiscoveryEvent>(16); |
There was a problem hiding this comment.
Retain the local autodiscovery buffer size
When local autodiscovery scans a directory with more than 16 changed check configs before the subscriber drains the broadcast receiver, Tokio's broadcast channel drops older events and the receiver observes Lagged, so some configs may never be scheduled. This line replaced the previous shared AD_STREAM_CAPACITY value of 100 with 16 while leaving the local provider's bursty file-scan behavior unchanged, making normal directories with dozens of checks much more likely to lose events.
Useful? React with 👍 / 👎.
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: 676a06d3-5157-42e1-b7bd-b5990f5be39f Baseline: bc61ae9 Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | +2.47 | [+2.14, +2.81] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +2.43 | [-1.88, +6.73] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | +0.06 | [-0.06, +0.17] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | +6.33 | [-51.55, +64.21] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | +3.66 | [-50.18, +57.51] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | +2.47 | [+2.14, +2.81] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +2.43 | [-1.88, +6.73] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | +1.46 | [-4.20, +7.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | +1.04 | [+1.00, +1.08] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | +0.87 | [+0.73, +1.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | +0.80 | [+0.66, +0.94] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | +0.71 | [+0.58, +0.84] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | +0.68 | [-0.61, +1.97] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | +0.64 | [-5.42, +6.70] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | +0.59 | [+0.43, +0.76] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | +0.59 | [+0.44, +0.74] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_cpu | % cpu utilization | +0.59 | [-1.51, +2.69] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_memory | memory utilization | +0.53 | [+0.29, +0.76] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | +0.50 | [+0.35, +0.64] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | +0.44 | [+0.29, +0.58] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_memory | memory utilization | +0.31 | [+0.15, +0.47] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_memory | memory utilization | +0.24 | [+0.08, +0.40] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | +0.19 | [+0.02, +0.35] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_throughput | ingress throughput | +0.19 | [+0.11, +0.26] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_throughput | ingress throughput | +0.11 | [+0.04, +0.19] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | +0.06 | [-0.06, +0.17] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | +0.05 | [-0.02, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | +0.05 | [-0.09, +0.19] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | +0.01 | [-0.17, +0.19] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.06, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.05, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.04, +0.03] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | -0.03 | [-0.21, +0.15] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_cpu | % cpu utilization | -0.17 | [-2.00, +1.65] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | -1.01 | [-1.20, -0.83] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_cpu | % cpu utilization | -1.14 | [-3.36, +1.08] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | -1.40 | [-1.53, -1.27] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | -3.21 | [-32.60, +26.18] | 1 | (metrics) (profiles) (logs) |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
|---|---|---|---|---|---|
| ✅ | quality_gates_rss_dsd_heavy | memory_usage | 10/10 | 123.44MiB ≤ 140MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | 40.97MiB ≤ 50MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | 61.63MiB ≤ 75MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | 176.38MiB ≤ 200MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | 28.35MiB ≤ 40MiB | (metrics) (profiles) (logs) |
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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
webern
left a comment
There was a problem hiding this comment.
Looks like you did not yet move the config registry which is helpful with my diff pending. I'll try to open a PR today.
2cbc9ba to
2d21ae4
Compare
Summary
This PR introduces a new crate,
datadog-agent-commons, as part of the start of trying to separate Datadog Agent-specific code fromsaluki-specific crates and allow for better sharing of helpers/types/etc between the various Datadog-specific components.The bulk of this change is related to two major moves: putting the Agent-specific
saluki-envcode intoagent-data-plane, and putting IPC-related helpers intodatadog-agent-commons. I structured the change this way because the environment provider we use in ADP is inherently specific to it: nothing else is going to reuse (at least not yet) so I wanted to isolate it there... while things like the Agent IPC code, and platform helpers for getting specific paths and so on... it's inherently shared/commons-y even if maybe we eventually decide it's also worth moving intoagent-data-plane.There's still a ton of Agent-specific code, namely component implementations, that live in
saluki-components. For now, those are staying put, as it makes the configuration testing story ("config registry") simpler to wrap our heads around with configuration living in a single place. I'll be evaluating moving them out -- along with ensuring we don't lose configuration testing coverage -- in a follow-up PR.Change Type
How did you test this PR?
Existing unit tests and a few new ones around IPC auth settings.
References
DADP-2