Skip to content

Conversation

@raphael
Copy link
Member

@raphael raphael commented Dec 26, 2025

Summary

Reduces logging noise from the health tracker subsystem while preserving actionable error/warning logs.

Changes

Removed high-frequency logs:

  • Info logs for StartPingLoop / StopPingLoop (logged every toolset registration)
  • Info log for toolset recovered (health flapping can spam this)

Added transition-based logging:

  • Track observed health state per toolset
  • Only emit warnings when health transitions from healthy → unhealthy
  • Avoids repeated warnings for persistently unhealthy toolsets

Fixed error handling:

  • StopPingLoop was using _, _ = ... to discard delete errors
  • Now properly logs delete failures

Made Logger opt-in via Config:

  • Config.Logger allows callers to inject a logger for health tracking
  • When nil, health tracking logs are suppressed entirely

Provider error logging:

  • Added error logging for pong failures in provider.Serve

What's preserved

  • Warn: "toolset became unhealthy" (with full context: threshold, interval, last pong, age)
  • Error: publish ping failures, delete failures, timestamp parse failures, pong failures

Testing

  • make lint
  • make test

- Remove Info logs for start/stop/recovery events (high-frequency noise)
- Track health state transitions; only log when transitioning unhealthy
- Add proper error handling for delete operations (was ignoring errors)
- Make Logger optional via Config (nil suppresses all health logs)
- Add error logging for pong failures in provider

Keeps Warn log for 'toolset became unhealthy' and all Error logs for
actual failures (publish ping, delete, parse timestamp, pong).
@raphael raphael enabled auto-merge (squash) December 26, 2025 01:11
@raphael raphael merged commit 9f3dbe3 into main Dec 26, 2025
2 checks passed
@raphael raphael deleted the reduce-health-tracker-log-noise branch December 26, 2025 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants