Skip to content

[AGENTRUN-673] Add mlx5_core network check metrics#40326

Merged
dd-mergequeue[bot] merged 12 commits into
mainfrom
jeremy.hanna/add-mlx5_core-network-metrics
Aug 28, 2025
Merged

[AGENTRUN-673] Add mlx5_core network check metrics#40326
dd-mergequeue[bot] merged 12 commits into
mainfrom
jeremy.hanna/add-mlx5_core-network-metrics

Conversation

@jeremy-hanna

Copy link
Copy Markdown
Contributor

What does this PR do?

The mlx5_core NIC metrics were added to the python network check after we had ported the ethtool parsing over so these were not being sent in our Azure staging clusters.

This PR adds support for parsing those stats and comprehensive unit tests for the ethtool metrics in general.

Motivation

Describe how you validated your changes (if not by through tests)

  • Thorough unit tests
  • Will deploy on staging to confirm

Possible Drawbacks / Trade-offs

@jeremy-hanna
jeremy-hanna requested a review from a team as a code owner August 27, 2025 20:30
@github-actions github-actions Bot added long review PR is complex, plan time to review it team/agent-runtimes labels Aug 27, 2025
queueTag = "cpu:" + cpuNum
newKey = strings.Join(parts[1:], "_")
metricPrefix = ".cpu."
continueCase = false

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.

We never told the parsing to halt when it found a matching queue name format

// we already guard against parsing unsupported NICs
queueMetrics := ethtoolMetricNames[driverName]
// skip queues metrics we don't support for the NIC
if !slices.Contains(queueMetrics, newKey) {

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.

we were only filtering global metrics but not queue metrics, this led to many additional metrics that the python check does not submit

@jeremy-hanna jeremy-hanna added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation qa/done QA done before merge and regressions are covered by tests and removed qa/no-code-change No code change in Agent code requiring validation labels Aug 27, 2025

@nathan-b nathan-b left a comment

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.

Seems generally reasonable to me, and I love all the extra testing! A couple of comments that you can take or ignore as you see fit :)

Comment thread pkg/collector/corechecks/net/networkv2/network.go Outdated
Comment thread pkg/collector/corechecks/net/networkv2/network.go Outdated
@cit-pr-commenter

Copy link
Copy Markdown

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: ab04d9ee-b3b4-487a-b370-99ed62a2f68e

Baseline: 8846a8e
Comparison: f9301b7
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 -0.20 [-3.37, +2.96] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
quality_gate_metrics_logs memory utilization +1.63 [+1.27, +1.98] 1 Logs bounds checks dashboard
quality_gate_logs % cpu utilization +1.36 [-1.40, +4.12] 1 Logs bounds checks dashboard
otlp_ingest_logs memory utilization +0.27 [+0.13, +0.42] 1 Logs
file_tree memory utilization +0.24 [+0.21, +0.28] 1 Logs
quality_gate_idle memory utilization +0.14 [+0.10, +0.18] 1 Logs bounds checks dashboard
file_to_blackhole_1000ms_latency egress throughput +0.12 [-0.46, +0.69] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.09 [-0.51, +0.68] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.06 [-0.54, +0.66] 1 Logs
ddot_metrics memory utilization +0.06 [-0.14, +0.26] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.01 [-0.08, +0.10] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.00 [-0.60, +0.59] 1 Logs
otlp_ingest_metrics memory utilization -0.01 [-0.16, +0.15] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.01 [-0.05, +0.02] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.06 [-0.13, +0.01] 1 Logs
docker_containers_cpu % cpu utilization -0.20 [-3.37, +2.96] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.22 [-0.26, -0.18] 1 Logs
quality_gate_idle_all_features memory utilization -0.30 [-0.33, -0.27] 1 Logs bounds checks dashboard
ddot_logs memory utilization -0.64 [-0.74, -0.53] 1 Logs
docker_containers_memory memory utilization -0.64 [-0.79, -0.49] 1 Logs

Bounds Checks: ❌ Failed

perf experiment bounds_check_name replicates_passed links
docker_containers_cpu simple_check_run 9/10
docker_containers_memory memory_usage 10/10
docker_containers_memory simple_check_run 8/10
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency 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_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
quality_gate_metrics_logs cpu_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs intake_connections 10/10 bounds checks dashboard
quality_gate_metrics_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_metrics_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_idle, 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_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_logs, bounds check lost_bytes: 10/10 replicas passed. Gate 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_metrics_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@agent-platform-auto-pr

Copy link
Copy Markdown
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 61eb450

Successful checks

Info

Quality gate Delta On disk size (MiB) Delta On wire size (MiB)
agent_deb_amd64 $${+0.01}$$ $${700.56}$$ < $${704.84}$$ $${-0.01}$$ $${177.19}$$ < $${178.58}$$
agent_deb_amd64_fips $${+0.01}$$ $${687.83}$$ < $${703.09}$$ $${-0.01}$$ $${174.06}$$ < $${178.12}$$
agent_heroku_amd64 $${0}$$ $${350.36}$$ < $${355.37}$$ $${-0}$$ $${94.01}$$ < $${95.72}$$
agent_msi $${0}$$ $${975.62}$$ < $${980.61}$$ $${+0.03}$$ $${150.15}$$ < $${152.67}$$
agent_rpm_amd64 $${+0.01}$$ $${700.54}$$ < $${704.83}$$ $${-0.01}$$ $${179.18}$$ < $${180.22}$$
agent_rpm_amd64_fips $${+0.01}$$ $${687.82}$$ < $${703.08}$$ $${-0.01}$$ $${175.77}$$ < $${179.85}$$
agent_rpm_arm64 $${+0.01}$$ $${689.56}$$ < $${694.74}$$ $${+0.03}$$ $${161.72}$$ < $${163.96}$$
agent_rpm_arm64_fips $${+0.01}$$ $${677.67}$$ < $${693.05}$$ $${-0.03}$$ $${158.38}$$ < $${163.0}$$
agent_suse_amd64 $${+0.01}$$ $${700.54}$$ < $${704.83}$$ $${-0.01}$$ $${179.18}$$ < $${180.22}$$
agent_suse_amd64_fips $${+0.01}$$ $${687.82}$$ < $${703.08}$$ $${-0.01}$$ $${175.77}$$ < $${179.85}$$
agent_suse_arm64 $${+0.01}$$ $${689.56}$$ < $${694.74}$$ $${+0.03}$$ $${161.72}$$ < $${163.96}$$
agent_suse_arm64_fips $${+0.01}$$ $${677.67}$$ < $${693.05}$$ $${-0.03}$$ $${158.38}$$ < $${163.0}$$
docker_agent_amd64 $${+0.01}$$ $${782.97}$$ < $${788.65}$$ $${+0.02}$$ $${269.94}$$ < $${272.01}$$
docker_agent_arm64 $${+0.01}$$ $${795.31}$$ < $${802.0}$$ $${+0}$$ $${256.7}$$ < $${259.7}$$
docker_agent_jmx_amd64 $${+0.01}$$ $${973.83}$$ < $${979.84}$$ $${+0.01}$$ $${338.56}$$ < $${340.95}$$
docker_agent_jmx_arm64 $${+0.01}$$ $${974.77}$$ < $${981.8}$$ $${+0}$$ $${321.31}$$ < $${324.65}$$
docker_cluster_agent_amd64 $${+0}$$ $${212.65}$$ < $${214.5}$$ $${+0}$$ $${72.21}$$ < $${73.51}$$
docker_cluster_agent_arm64 $${-0}$$ $${228.61}$$ < $${230.33}$$ $${-0}$$ $${68.48}$$ < $${69.77}$$
docker_cws_instrumentation_amd64 $${0}$$ $${7.07}$$ < $${7.12}$$ $${-0}$$ $${2.95}$$ < $${3.29}$$
docker_cws_instrumentation_arm64 $${0}$$ $${6.69}$$ < $${6.92}$$ $${-0}$$ $${2.71}$$ < $${3.07}$$
docker_dogstatsd_amd64 $${+0}$$ $${38.32}$$ < $${39.57}$$ $${-0}$$ $${14.81}$$ < $${15.76}$$
docker_dogstatsd_arm64 $${0}$$ $${36.99}$$ < $${38.2}$$ $${+0}$$ $${14.26}$$ < $${14.83}$$
dogstatsd_deb_amd64 $${0}$$ $${29.55}$$ < $${31.4}$$ $${+0}$$ $${7.8}$$ < $${8.95}$$
dogstatsd_deb_arm64 $${0}$$ $${28.14}$$ < $${29.97}$$ $${-0}$$ $${6.75}$$ < $${7.89}$$
dogstatsd_rpm_amd64 $${0}$$ $${29.55}$$ < $${31.4}$$ $${+0}$$ $${7.81}$$ < $${8.96}$$
dogstatsd_suse_amd64 $${0}$$ $${29.55}$$ < $${31.4}$$ $${+0}$$ $${7.81}$$ < $${8.96}$$
iot_agent_deb_amd64 $${+0}$$ $${54.16}$$ < $${54.55}$$ $${+0}$$ $${13.65}$$ < $${14.45}$$
iot_agent_deb_arm64 $${+0}$$ $${51.47}$$ < $${51.9}$$ $${+0}$$ $${11.82}$$ < $${12.63}$$
iot_agent_deb_armhf $${+0}$$ $${51.03}$$ < $${51.42}$$ $${+0}$$ $${11.89}$$ < $${12.74}$$
iot_agent_rpm_amd64 $${+0}$$ $${54.16}$$ < $${54.55}$$ $${+0}$$ $${13.67}$$ < $${14.47}$$
iot_agent_suse_amd64 $${+0}$$ $${54.16}$$ < $${54.55}$$ $${+0}$$ $${13.67}$$ < $${14.47}$$

@jeremy-hanna

Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Aug 28, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-08-28 00:27:24 UTC ℹ️ Start processing command /merge


2025-08-28 00:27:28 UTC ℹ️ MergeQueue: pull request added to the queue

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


2025-08-28 00:27:45 UTCMergeQueue: This merge request is not mergeable, blocked by github

PR can't be merged according to github policy

@jeremy-hanna

Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Aug 28, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-08-28 13:24:53 UTC ℹ️ Start processing command /merge


2025-08-28 13:25:09 UTC ℹ️ MergeQueue: pull request added to the queue

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


2025-08-28 13:42:11 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue
dd-mergequeue Bot merged commit decde86 into main Aug 28, 2025
270 checks passed
@dd-mergequeue
dd-mergequeue Bot deleted the jeremy.hanna/add-mlx5_core-network-metrics branch August 28, 2025 13:42
@github-actions github-actions Bot added this to the 7.71.0 milestone Aug 28, 2025
agent-platform-auto-pr Bot pushed a commit that referenced this pull request Aug 28, 2025
### What does this PR do?

The mlx5_core NIC metrics were added to the [python network
check](DataDog/integrations-core#20481) after we
had ported the ethtool parsing over so these were not being sent in our
Azure staging clusters.

This PR adds support for parsing those stats and comprehensive unit
tests for the ethtool metrics in general.

### Motivation

### Describe how you validated your changes (if not by through tests)

* Thorough unit tests
* Will deploy on staging to confirm

### Possible Drawbacks / Trade-offs

(cherry picked from commit decde86)
FlorentClarret pushed a commit that referenced this pull request Sep 3, 2025
…40349)

Backport decde86 from #40326.

___


### What does this PR do?

The mlx5_core NIC metrics were added to the [python network
check](DataDog/integrations-core#20481) after we
had ported the ethtool parsing over so these were not being sent in our
Azure staging clusters.

This PR adds support for parsing those stats and comprehensive unit
tests for the ethtool metrics in general.

### Motivation

### Describe how you validated your changes (if not by through tests)

* Thorough unit tests
* Will deploy on staging to confirm

### Possible Drawbacks / Trade-offs

Co-authored-by: Jeremy Hanna <[email protected]>
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 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.

2 participants