feat(gateway): improve startup timing diagnostics#1190
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83c176fb85
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| openclawTrace: startupTrace, | ||
| }; | ||
| logger.info('[metric] gateway.startup', startupMetric); | ||
| if (spawnToReadyMs !== undefined && spawnToReadyMs >= GATEWAY_STARTUP_SLOW_TOTAL_MS) { |
There was a problem hiding this comment.
Measure slow startup through the handshake
In this managed-start path, tReady is set before connectWithStartupRetry runs, so this condition only measures the readiness probe rather than spawn-to-handshake time. If the gateway emits connect.challenge quickly but the actual connect handshake/retry loop pushes startup over 30s (for example repeated gateway starting responses), the slow-startup summary is skipped even though the user experienced the slow startup and the added task expects spawn-to-handshake coverage. Use tConnected - tSpawned or another post-handshake duration for the threshold.
Useful? React with 👍 / 👎.
No description provided.