Repository navigation
feat(health): add application health statistics endpoint - #426
Merged
Merged
Conversation
This was referenced Oct 28, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
alex289
force-pushed
the
feat/health-stats-api
branch
4 times, most recently
from
October 28, 2026 20:36
3e4079c to
4b8ff84
Compare
timokoessler
approved these changes
Oct 29, 2026
GET /api/v1/applications/:id/health?range=24h|7d|30d returns the availability (healthy time / observed time), downtime, time without data, bucketed bars for the availability chart and the incidents and data gaps of the range. Incidents that start during or shortly after a deployment or image update are linked to it.
…gers Address review: ignore events that changed nothing, stop attributing incidents to a stuck running event, cap the changes loaded per range and sum buckets in a single pass.
alex289
force-pushed
the
feat/health-stats-api
branch
from
October 29, 2026 09:32
8e0aa9a to
5c506a9
Compare
alex289
enabled stacked auto-merge (squash)
October 29, 2026 09:33
timokoessler
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Description
Part 3/4 of #268. Adds
GET /api/v1/applications/:id/health?range=24h|7d|30d(default24h).Response
current: latest recorded status and since when.availability: healthy time / observed time in percent.nullwhen nothing was observed. Time without data (unknown, e.g. agent offline) is excluded.downtimeSeconds(degraded + unhealthy + stopped),noDataSeconds,incidentCount,longestIncidentSeconds,dataGapCount.buckets: one per bar (1h / 3h / 12h → 24 / 56 / 60 bars), with seconds per status. A bucket shows its most severe failure; without failures it shows "no data" when that outweighs the healthy time.incidents(newest first, max 100): consecutive degraded/unhealthy/stopped changes are merged into one incident with the most severe status and the failing services. Recordedunknownperiods are listed as data gaps with their reason. Incidents that started before the range keep their real start and duration, but only the in-range part counts towards downtime.trigger: an incident that starts during a deployment or image update, or up to 5 minutes after it, is linked to it (with the commit hash for deployments).