Skip to content

[AGENTRUN-158] Add windows networkv2 check from python #37240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Jun 12, 2025

Conversation

jeremy-hanna
Copy link
Contributor

@jeremy-hanna jeremy-hanna commented May 21, 2025

What does this PR do?

This PR migrates the functionality in the windows python network check to go behind the use_networkv2_check configuration flag with full feature parity

Motivation

Describe how you validated your changes

  • unit tests
  • will add e2e test in follow up PR

Possible Drawbacks / Trade-offs

Additional Notes

@jeremy-hanna jeremy-hanna requested a review from a team as a code owner May 21, 2025 14:45
@jeremy-hanna jeremy-hanna requested a review from pgimalac May 21, 2025 14:45
@github-actions github-actions bot added long review PR is complex, plan time to review it team/agent-runtimes labels May 21, 2025
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented May 21, 2025

Uncompressed package size comparison

Comparison with ancestor 1d5fb0182f46c8b375bebc89c10030c4ad3b0c94

Diff per package
package diff status size ancestor threshold
datadog-agent-arm64-deb 0.00MB 765.06MB 765.06MB 0.50MB
datadog-agent-aarch64-rpm 0.00MB 773.99MB 773.99MB 0.50MB
datadog-agent-amd64-deb 0.00MB 775.77MB 775.77MB 0.50MB
datadog-agent-x86_64-rpm 0.00MB 784.72MB 784.72MB 0.50MB
datadog-agent-x86_64-suse 0.00MB 784.72MB 784.72MB 0.50MB
datadog-dogstatsd-amd64-deb 0.00MB 31.22MB 31.22MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 31.30MB 31.30MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 31.30MB 31.30MB 0.50MB
datadog-dogstatsd-arm64-deb 0.00MB 30.05MB 30.05MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 379.37MB 379.37MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 61.71MB 61.71MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 61.79MB 61.79MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 61.79MB 61.79MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 58.94MB 58.94MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 59.02MB 59.02MB 0.50MB

Decision

✅ Passed

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented May 28, 2025

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 37b769e

Successful checks

Info

Quality gate Delta On disk size (MiB) Delta On wire size (MiB)
agent_deb_amd64 $${0}$$ $${696.34}$$ < $${752.99}$$ $${+0.04}$$ $${176.08}$$ < $${187.44}$$
agent_deb_amd64_fips $${0}$$ $${694.55}$$ < $${751.36}$$ $${+0.01}$$ $${175.5}$$ < $${187.06}$$
agent_heroku_amd64 $${0}$$ $${358.64}$$ < $${369.68}$$ $${+0}$$ $${96.51}$$ < $${99.55}$$
agent_msi $${+0.2}$$ $${958.73}$$ < $${987.01}$$ $${-0.02}$$ $${146.26}$$ < $${150.72}$$
agent_rpm_amd64 $${0}$$ $${696.33}$$ < $${752.98}$$ $${+0.05}$$ $${177.63}$$ < $${190.03}$$
agent_rpm_amd64_fips $${0}$$ $${694.54}$$ < $${751.35}$$ $${+0.01}$$ $${177.48}$$ < $${189.81}$$
agent_rpm_arm64 $${0}$$ $${686.33}$$ < $${739.42}$$ $${+0}$$ $${161.06}$$ < $${171.23}$$
agent_rpm_arm64_fips $${0}$$ $${684.69}$$ < $${737.91}$$ $${+0.06}$$ $${160.15}$$ < $${170.22}$$
agent_suse_amd64 $${0}$$ $${696.33}$$ < $${752.98}$$ $${+0.05}$$ $${177.63}$$ < $${190.03}$$
agent_suse_amd64_fips $${0}$$ $${694.54}$$ < $${751.35}$$ $${+0.01}$$ $${177.48}$$ < $${189.81}$$
agent_suse_arm64 $${0}$$ $${686.33}$$ < $${739.42}$$ $${+0}$$ $${161.06}$$ < $${171.23}$$
agent_suse_arm64_fips $${0}$$ $${684.69}$$ < $${737.91}$$ $${+0.06}$$ $${160.15}$$ < $${170.22}$$
docker_agent_amd64 $${+0}$$ $${780.13}$$ < $${849.39}$$ $${-0}$$ $${268.66}$$ < $${288.34}$$
docker_agent_arm64 $${0}$$ $${793.58}$$ < $${858.97}$$ $${-0}$$ $${256.03}$$ < $${274.36}$$
docker_agent_jmx_amd64 $${-0}$$ $${971.32}$$ < $${1040.59}$$ $${-0}$$ $${337.62}$$ < $${357.3}$$
docker_agent_jmx_arm64 $${-0}$$ $${973.37}$$ < $${1038.77}$$ $${-0}$$ $${320.99}$$ < $${339.32}$$
docker_agent_windows1809 $${+0.14}$$ $${1486.87}$$ < $${1557.19}$$ $${+0.41}$$ $${487.96}$$ < $${507.33}$$
docker_agent_windows1809_core $${+0.2}$$ $${6216.83}$$ < $${6287.46}$$ $${0}$$ $${2048.0}$$ < $${2067.76}$$
docker_agent_windows1809_core_jmx $${+0.2}$$ $${6338.4}$$ < $${6409.04}$$ $${0}$$ $${2048.0}$$ < $${2067.76}$$
docker_agent_windows1809_jmx $${+0.2}$$ $${1608.5}$$ < $${1679.14}$$ $${-0.2}$$ $${529.96}$$ < $${550.27}$$
docker_agent_windows2022 $${+0.27}$$ $${1506.3}$$ < $${1576.85}$$ $${+0.11}$$ $${500.73}$$ < $${520.76}$$
docker_agent_windows2022_core $${+0.34}$$ $${6189.9}$$ < $${6260.53}$$ $${0}$$ $${2048.0}$$ < $${2067.76}$$
docker_agent_windows2022_core_jmx $${+0.28}$$ $${6311.29}$$ < $${6382.17}$$ $${0}$$ $${2048.0}$$ < $${2067.76}$$
docker_agent_windows2022_jmx $${+0.2}$$ $${1627.89}$$ < $${1698.2}$$ $${+0.14}$$ $${543.05}$$ < $${562.99}$$
docker_cluster_agent_amd64 $${-0}$$ $${212.81}$$ < $${259.73}$$ $${+0}$$ $${72.36}$$ < $${103.68}$$
docker_cluster_agent_arm64 $${-0}$$ $${228.68}$$ < $${274.24}$$ $${+0.01}$$ $${68.65}$$ < $${98.45}$$
docker_cws_instrumentation_amd64 $${0}$$ $${7.08}$$ < $${7.12}$$ $${+0}$$ $${2.95}$$ < $${3.29}$$
docker_cws_instrumentation_arm64 $${0}$$ $${6.69}$$ < $${6.92}$$ $${+0}$$ $${2.7}$$ < $${3.07}$$
docker_dogstatsd_amd64 $${0}$$ $${39.22}$$ < $${39.57}$$ $${+0}$$ $${15.12}$$ < $${15.76}$$
docker_dogstatsd_arm64 $${+0}$$ $${37.88}$$ < $${38.2}$$ $${+0}$$ $${14.54}$$ < $${14.83}$$
dogstatsd_deb_amd64 $${0}$$ $${30.44}$$ < $${31.52}$$ $${-0}$$ $${8.0}$$ < $${8.97}$$
dogstatsd_deb_arm64 $${0}$$ $${29.02}$$ < $${30.08}$$ $${+0}$$ $${6.94}$$ < $${7.92}$$
dogstatsd_rpm_amd64 $${0}$$ $${30.44}$$ < $${31.52}$$ $${+0}$$ $${8.01}$$ < $${8.98}$$
dogstatsd_suse_amd64 $${0}$$ $${30.44}$$ < $${31.52}$$ $${+0}$$ $${8.01}$$ < $${8.98}$$
iot_agent_deb_amd64 $${0}$$ $${50.4}$$ < $${60.17}$$ $${+0}$$ $${12.83}$$ < $${15.82}$$
iot_agent_deb_arm64 $${+0}$$ $${47.87}$$ < $${56.94}$$ $${+0}$$ $${11.13}$$ < $${13.86}$$
iot_agent_deb_armhf $${+0}$$ $${47.44}$$ < $${56.41}$$ $${+0.01}$$ $${11.19}$$ < $${13.86}$$
iot_agent_rpm_amd64 $${0}$$ $${50.4}$$ < $${60.18}$$ $${-0}$$ $${12.85}$$ < $${15.84}$$
iot_agent_rpm_arm64 $${+0}$$ $${47.87}$$ < $${56.94}$$ $${+0}$$ $${11.15}$$ < $${13.76}$$
iot_agent_suse_amd64 $${0}$$ $${50.4}$$ < $${60.18}$$ $${-0}$$ $${12.85}$$ < $${15.84}$$

@jeremy-hanna jeremy-hanna requested a review from a team as a code owner June 2, 2025 03:09
@jeremy-hanna jeremy-hanna added the qa/done QA done before merge and regressions are covered by tests label Jun 2, 2025
fieldName := sType.Field(i).Name
metricName := metricPrefix + tcpStatsMapping[fieldName]
metricValue := s.Field(i).Uint()
if strings.HasSuffix(metricName, ".connections") || strings.HasSuffix(metricName, ".current_established") {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use a set similarly to what is done in the Python version ?

Copy link
Contributor

@aliciascott aliciascott left a comment

Choose a reason for hiding this comment

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

approved pending the networkv2 update that is noted

Copy link

cit-pr-commenter bot commented Jun 5, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 59e019b6-6b41-418b-aa54-316bc4ae9f35

Baseline: 37b769e
Comparison: e296a65
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization +3.46 [+0.41, +6.52] 1 Logs
file_tree memory utilization +0.69 [+0.52, +0.86] 1 Logs
otlp_ingest_metrics memory utilization +0.64 [+0.48, +0.81] 1 Logs
ddot_metrics memory utilization +0.15 [+0.03, +0.27] 1 Logs
tcp_syslog_to_blackhole ingress throughput +0.12 [+0.00, +0.23] 1 Logs
ddot_logs memory utilization +0.10 [-0.05, +0.24] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput +0.08 [-0.55, +0.70] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.05 [-0.61, +0.71] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.04 [-0.56, +0.65] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput +0.04 [-0.20, +0.28] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.02, +0.02] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.00 [-0.28, +0.28] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.00 [-0.57, +0.57] 1 Logs
quality_gate_idle memory utilization -0.02 [-0.10, +0.06] 1 Logs bounds checks dashboard
file_to_blackhole_0ms_latency egress throughput -0.04 [-0.61, +0.52] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput -0.05 [-0.62, +0.53] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.09 [-0.73, +0.55] 1 Logs
quality_gate_idle_all_features memory utilization -0.09 [-0.16, -0.01] 1 Logs bounds checks dashboard
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.53 [-0.58, -0.48] 1 Logs
otlp_ingest_logs memory utilization -0.68 [-0.80, -0.55] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.79 [-1.63, +0.04] 1 Logs
quality_gate_logs % cpu utilization -1.24 [-3.95, +1.48] 1 Logs bounds checks dashboard
docker_containers_memory memory utilization -2.44 [-2.62, -2.27] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
docker_containers_cpu simple_check_run 10/10
docker_containers_memory memory_usage 10/10
docker_containers_memory simple_check_run 10/10
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_0ms_latency_http1 lost_bytes 10/10
file_to_blackhole_0ms_latency_http1 memory_usage 10/10
file_to_blackhole_0ms_latency_http2 lost_bytes 10/10
file_to_blackhole_0ms_latency_http2 memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency_linear_load memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_300ms_latency lost_bytes 10/10
file_to_blackhole_300ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_logs memory_usage 10/10 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_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 lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, 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, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.

Copy link
Member

@pgimalac pgimalac left a comment

Choose a reason for hiding this comment

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

Some minor comments but overall LGTM

@jeremy-hanna
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jun 12, 2025

View all feedbacks in Devflow UI.

2025-06-12 23:21:35 UTC ℹ️ Start processing command /merge


2025-06-12 23:21:40 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 58m (p90).


2025-06-12 23:58:37 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 47212fd into main Jun 12, 2025
239 checks passed
@dd-mergequeue dd-mergequeue bot deleted the jeremy.hanna/add-windows-networkv2-check branch June 12, 2025 23:58
@github-actions github-actions bot added this to the 7.68.0 milestone Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
long review PR is complex, plan time to review it qa/done QA done before merge and regressions are covered by tests team/agent-runtimes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants