Skip to content

feat(models/up): log details when returning 503#3114

Merged
chrarnoldus merged 1 commit intomainfrom
log-models-up-503
May 8, 2026
Merged

feat(models/up): log details when returning 503#3114
chrarnoldus merged 1 commit intomainfrom
log-models-up-503

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot Bot commented May 7, 2026

Summary

When /api/models/up returns 503, also emit a console.error with the unhealthy monitored models and their per-window metrics. Currently 503 responses leave no server-side trace (only DB/timeout failures hit Sentry via the catch block), so postmortems require replaying the endpoint with ?at=<iso> within the 24h lookback. This adds a durable log line so we can reconstruct what tripped the alert from logs alone.

Verification

N/A — log-only change behind the existing 503 branch.

Visual Changes

N/A

Reviewer Notes

  • Logs currentRequests, previousRequests, baselineRequests, percentChange, uniqueUsersBaseline per unhealthy model plus the anchor time. No PII; kilo_user_id is not included.
  • Only fires when hasSignificantDrop is true, so no log volume change in steady state.

@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot Bot commented May 7, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • apps/web/src/app/api/models/up/route.ts

Reviewed by gpt-5.5-2026-04-23 · 78,850 tokens

@chrarnoldus chrarnoldus self-assigned this May 7, 2026
@chrarnoldus chrarnoldus merged commit bfa7a5f into main May 8, 2026
13 checks passed
@chrarnoldus chrarnoldus deleted the log-models-up-503 branch May 8, 2026 09:21
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