Skip to content

feat(health): add weighted health scoring algorithm for deployment monitoring#857

Merged
temma02 merged 1 commit into
StellerCraft:mainfrom
Nexha-dev:feat/deployment-health-score-algorithm
Jun 27, 2026
Merged

feat(health): add weighted health scoring algorithm for deployment monitoring#857
temma02 merged 1 commit into
StellerCraft:mainfrom
Nexha-dev:feat/deployment-health-score-algorithm

Conversation

@Nexha-dev

Copy link
Copy Markdown
Contributor

Closes #761

Summary

Replaces the basic health status of GET /api/deployments/[id]/health with a weighted health score (0–100) aggregated from the last 24h of analytics data.

Changes

  • Add health-score.service.ts computing a weighted score from:
    • uptime (40%) — ratio of successful uptime_check events
    • p95 latency (30%) — linear interpolation between 200ms (full) and 2000ms (zero)
    • error rate (20%) — 1 - errors/total
    • RPC connectivity (10%) — live probe (Vercel circuit state used as connectivity proxy)
  • Update the health route to return { score, breakdown: { uptime, latency, errorRate, rpc }, ... }.
  • Tests for perfect score, proportional uptime, latency thresholds/interpolation, error-rate scoring, unhealthy RPC, and the no-data case.

Notes

  • Score range 0–100, weights sum to 1.0, computed over the last 24h.

🤖 Generated with Claude Code

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Nexha-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@temma02 temma02 merged commit a0d0f6e into StellerCraft:main Jun 27, 2026
0 of 7 checks passed
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.

Implement Deployment Health Scoring Algorithm with Weighted Metric Aggregation

2 participants