report interface details on Windows and macOS #59183
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.45) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 440 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.364
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #59183"
general
weight: 0.35
hush-hush
<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->
What does this PR do?
It extends the Go network check (networkv2) on Windows and macOS to report details about each network interface.
- system.net.iface.speed is the negotiated link speed in Mbps. It is only reported for Ethernet interfaces.
- The gauges are tagged with iface and iface_type (ethernet, wifi, cellular, loopback, tunnel, virtual or other). They also get duplex and vlan_id when the interface reports them.
- It reports the same metrics as the Python check, plus system.net.packets_in.drop and system.net.packets_out.drop.
- Counters come from the net.link.generic.ifdata sysctl. Link state, speed, duplex, VLAN and functional type come from ioctls.
- A new nicinfo cgo subpackage reads IOKit and SystemConfiguration for the description, permanent MAC, built-in flag, vendor, model and driver. The result is cached and refreshed when the interface list changes or every 10 minutes.
- With collect_connection_state, the check also counts TCP connections in the SYN_RCVD, FIN_WAIT_1, FIN_WAIT_2 and CLOSED states. The Python check misses these because it looks for the Linux spellings.
Motivation
Need Ethernet adapter information (link state, speed, duplex, VLAN, MAC addresses and driver) for Windows and macOS hosts, especially end-user devices.
- Windows reports made-up speeds for virtual adapters.
- On macOS, the speed of a Wi-Fi interface could be a driver estimate.
- The Wi-Fi link rate is already reported as system.wlan.txrate.
Describe how you validated your changes
- Wi-Fi reported its permanent MAC and its DriverKit driver.
- The Thunderbolt IP ports were typed other.
- The USB device-mode interfaces were typed virtual.
Additional Notes