add debug logging for healthcheck and setup flows in coglet#2828
Merged
markphelps merged 2 commits intomainfrom Mar 12, 2026
Merged
add debug logging for healthcheck and setup flows in coglet#2828markphelps merged 2 commits intomainfrom
markphelps merged 2 commits intomainfrom
Conversation
Add tracing::debug! calls throughout the healthcheck and setup code paths to improve observability when debugging with RUST_LOG=debug or COG_LOG_LEVEL=debug. Healthcheck: log the full request lifecycle from HTTP handler through service layer, orchestrator handle, event loop dispatch/coalescing, worker handler invocation, and result distribution. Setup: log orchestrator config, setup duration, timeout behavior, health state transitions, setup result status, and setup log drain sizes across orchestrator, worker, and Python entry point.
The healthcheck endpoint is polled every few seconds by K8s probes. Keep the happy-path lines at trace to avoid flooding debug logs, while leaving the unhealthy/error/timeout paths and all setup lines at debug where they are useful for diagnosing real issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tracing::debug!calls throughout the healthcheck and setup code paths in coglet to improve observability when debugging withRUST_LOG=debugorCOG_LOG_LEVEL=debugFiles changed
crates/coglet/src/transport/http/routes.rs— HTTP/health-checkendpoint loggingcrates/coglet/src/service.rs—health(),set_health(),set_setup_result(),healthcheck()loggingcrates/coglet/src/orchestrator.rs— Orchestrator handle healthcheck, event loop healthcheck dispatch/result, andspawn_workersetup flow loggingcrates/coglet/src/worker.rs— Worker-side setup timing and healthcheck handler loggingcrates/coglet-python/src/lib.rs—serve_subprocesssetup flow logging with timingTesting
All new logging uses
tracing::debug!()and is only visible whenRUST_LOG=debugorCOG_LOG_LEVEL=debugis set — no behavioral changes.