Skip to content

add debug logging for healthcheck and setup flows in coglet#2828

Merged
markphelps merged 2 commits intomainfrom
mphelps/add-debug-logging-healthcheck-setup
Mar 12, 2026
Merged

add debug logging for healthcheck and setup flows in coglet#2828
markphelps merged 2 commits intomainfrom
mphelps/add-debug-logging-healthcheck-setup

Conversation

@markphelps
Copy link
Copy Markdown
Contributor

Summary

  • Add tracing::debug! calls throughout the healthcheck and setup code paths in coglet to improve observability when debugging with RUST_LOG=debug or COG_LOG_LEVEL=debug
  • Healthcheck logging covers the full request lifecycle: HTTP handler → service layer → orchestrator handle → event loop dispatch/coalescing → worker handler → result distribution
  • Setup logging covers orchestrator config, setup duration timing, timeout behavior, health state transitions, setup result metadata, and setup log drain sizes

Files changed

  • crates/coglet/src/transport/http/routes.rs — HTTP /health-check endpoint logging
  • crates/coglet/src/service.rshealth(), set_health(), set_setup_result(), healthcheck() logging
  • crates/coglet/src/orchestrator.rs — Orchestrator handle healthcheck, event loop healthcheck dispatch/result, and spawn_worker setup flow logging
  • crates/coglet/src/worker.rs — Worker-side setup timing and healthcheck handler logging
  • crates/coglet-python/src/lib.rsserve_subprocess setup flow logging with timing

Testing

All new logging uses tracing::debug!() and is only visible when RUST_LOG=debug or COG_LOG_LEVEL=debug is set — no behavioral changes.

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.
@markphelps markphelps requested a review from a team as a code owner March 12, 2026 17:45
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.
@markphelps markphelps requested a review from michaeldwan March 12, 2026 18:50
Copy link
Copy Markdown
Member

@michaeldwan michaeldwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@markphelps markphelps merged commit 028b6fe into main Mar 12, 2026
34 checks passed
@markphelps markphelps deleted the mphelps/add-debug-logging-healthcheck-setup branch March 12, 2026 18:56
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