Resolved conflict in internal/records/records.go:
- Upstream refactor moved deletion code to records_deletion.go and
switched averaging functions from package-level globals to local
variables (var row StatsRecord / params := make(dbx.Params, 1)).
- Kept AverageProbeStats and rewrote it to match the new local-variable
pattern.
- Dropped duplicated deletion helpers from records.go (they now live in
records_deletion.go).
- Added "network_probe_stats" to the collections list in
records_deletion.go:deleteOldSystemStats so probe stats keep the same
retention policy.
Resolve the target hostname before starting the timer so the
measurement reflects pure TCP handshake time only.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the ping-command-only implementation with a three-tier
approach using golang.org/x/net/icmp:
1. Raw socket (ip4:icmp) — works with root or CAP_NET_RAW
2. Unprivileged datagram socket (udp4) — works on Linux/macOS
without special privileges
3. System ping command — fallback when neither socket works
The method is auto-detected on first probe and cached for all
subsequent calls, avoiding repeated failed attempts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Apply appendData() for gap detection in both realtime and non-realtime
modes, so the latency chart shows breaks instead of smooth lines when
data is missing during service interruptions
- Handle null stats in gap marker entries to prevent runtime crashes
- Fix color assignment: use CSS variables (--chart-1..5) for ≤5 probes,
switch to dynamic HSL distribution for >5 probes so all lines are
visible with distinct colors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>