You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GitHubAppRateLimitRemaining metric is not recorded for the exact call that gets rate-limited #5425
isJobQueued and createJitConfig (in github-runner.ts) both call metricGitHubAppRateLimit(response.headers, appIndex) right after a successful GitHub API call, using the rate-limit headers on that response. If the call itself fails because the app is rate-limited, that line is never reached, since it comes after the await that just threw.
Impact
The GitHubAppRateLimitRemaining CloudWatch metric (enabled via ENABLE_METRIC_GITHUB_APP_RATE_LIMIT) never gets a data point for the exact call that hit the rate limit — the one moment the metric exists to catch. A dashboard built on this metric can show budget trending down over time but will miss the specific blocked calls, making it harder to correlate "which call got blocked and when" with what else was happening.
Proposed fix
Catch the error in both places, pull the same rate-limit headers off the failed response if present, and record the metric before re-raising or moving on — the headers are already there on a 403/429 response, they're just not being read.
Activity
fix(github-runner): record the rate-limit metric even when the call f…