Skip to content

feat(status): label transition_seconds with the destination status - #216

Merged
DerekFrank merged 2 commits into
awslabs:mainfrom
DerekFrank:node-repair
Aug 12, 2026
Merged

feat(status): label transition_seconds with the destination status#216
DerekFrank merged 2 commits into
awslabs:mainfrom
DerekFrank:node-repair

Conversation

@DerekFrank

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

The transition_seconds histogram only labeled the status a condition was LEFT (status), never the status it moved TO. A dwell in e.g. Ready=Unknown or Ready=False was therefore indistinguishable between "recovered to True" and any other outcome, so recovery-duration for a condition could not be isolated.

Add a to_status label to operator[_<kind>]_status_condition_transition_seconds. status still means the state being left (backward compatible); to_status is the state entered. Recovery duration is then transition_seconds filtered to status=False/Unknown, to_status=True. The recovery rate can be derived by comparing that against transitions_total entries into the unhealthy state.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The transition_seconds histogram only labeled the status a condition was
LEFT (`status`), never the status it moved TO. A dwell in e.g. Ready=Unknown
or Ready=False was therefore indistinguishable between "recovered to True"
and any other outcome, so recovery-duration for a condition could not be
isolated.

Add a `to_status` label to `operator[_<kind>]_status_condition_transition_seconds`.
`status` still means the state being left (backward compatible); `to_status`
is the state entered. Recovery duration is then transition_seconds filtered
to status=False/Unknown, to_status=True. The recovery *rate* can be derived
by comparing that against transitions_total entries into the unhealthy state.

Adds a test asserting the destination label is recorded on a transition.
@DerekFrank
DerekFrank requested a review from a team as a code owner August 12, 2026 22:25

@ryan-mist ryan-mist left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@DerekFrank
DerekFrank enabled auto-merge (squash) August 12, 2026 23:24
@DerekFrank
DerekFrank merged commit 6d329ce into awslabs:main Aug 12, 2026
1 check 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.

2 participants