diff --git a/services/graph/pkg/server/debug/server.go b/services/graph/pkg/server/debug/server.go index 85136a94de..8d1462a72a 100644 --- a/services/graph/pkg/server/debug/server.go +++ b/services/graph/pkg/server/debug/server.go @@ -14,7 +14,8 @@ func Server(opts ...Option) (*http.Server, error) { checkHandler := handlers.NewCheckHandler( handlers.NewCheckHandlerConfiguration(). - WithLogger(options.Logger), + WithLogger(options.Logger). + WithCheck("web reachability", handlers.NewHTTPCheck(options.Config.HTTP.Addr)), ) return debug.NewService( diff --git a/services/idp/pkg/server/debug/server.go b/services/idp/pkg/server/debug/server.go index 9d73326785..a06c37c3ae 100644 --- a/services/idp/pkg/server/debug/server.go +++ b/services/idp/pkg/server/debug/server.go @@ -14,7 +14,13 @@ import ( func Server(opts ...Option) (*http.Server, error) { options := newOptions(opts...) - checkHandler := handlers.NewCheckHandler( + healthHandler := handlers.NewCheckHandler( + handlers.NewCheckHandlerConfiguration(). + WithLogger(options.Logger). + WithCheck("http reachability", handlers.NewHTTPCheck(options.Config.HTTP.Addr)), + ) + + readinessHandler := handlers.NewCheckHandler( handlers.NewCheckHandlerConfiguration(). WithLogger(options.Logger). WithCheck("tcp-check", func(ctx context.Context) error { @@ -28,7 +34,8 @@ func Server(opts ...Option) (*http.Server, error) { } return handlers.NewTCPCheck(tcpURL)(ctx) - }), + }). + WithInheritedChecksFrom(healthHandler.Conf), ) return debug.NewService( @@ -39,7 +46,7 @@ func Server(opts ...Option) (*http.Server, error) { debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), debug.Zpages(options.Config.Debug.Zpages), - debug.Health(checkHandler), - debug.Ready(checkHandler), + debug.Health(healthHandler), + debug.Ready(readinessHandler), ), nil }