Ensure health check systems are not only created but also properly launched and integrated with observability infrastructure. Health checkers must follow the complete lifecycle: creation, launch, and metrics integration.
Ensure health check systems are not only created but also properly launched and integrated with observability infrastructure. Health checkers must follow the complete lifecycle: creation, launch, and metrics integration.
When implementing health checks, verify that:
Example of incomplete implementation:
// TCP health checkers created but never launched
if conf.LoadBalancer.HealthCheck != nil {
m.healthCheckers[serviceName] = healthcheck.NewServiceTCPHealthChecker(
ctx,
m.dialerManager,
nil, // metrics parameter passed as nil
// ... other params
)
// Missing: no launch call equivalent to serviceManager.LaunchHealthCheck(ctx)
}
Compare this with HTTP health checkers that properly launch via serviceManager.LaunchHealthCheck(ctx)
and integrate metrics. TCP health checks should follow the same complete lifecycle pattern to ensure proper observability and functionality.
Enter the URL of a public GitHub repository