Repository navigation
feat(observability): label repeat RUNNING attempts on the status transition metric - #406
Open
yuechao-qin wants to merge 1 commit into
Open
yuechao-qin wants to merge 1 commit into
yuechao-qin wants to merge 1 commit into
Conversation
morgan-wowk
approved these changes
Oct 26, 2026
…sition metric PENDING->RUNNING records two different waits: waiting to start, which is the orchestrator's queue, and waiting to resume after preemption, which is how long a tenant's cluster took to give the machine back. One resumption in a 5 minute window can set the p99 that pages the on-call. Adds execution.run_attempt (first | repeat | none), computed from the status history the session already holds. Nothing is merged or dropped, so existing queries and dashboards keep working.
yuechao-qin
force-pushed
the
ycq/observability-01-run-attempt
branch
from
October 27, 2026 16:33
60289c1 to
287a9ec
Compare
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.
What
A preempted task restarting looks exactly like a slow queue, so one restart can set the
p99 that pages the on-call. Two different waits currently share one number:
and it is what the alert thinks it is measuring.
cluster took it away mid-run. Not Tangle's queue at all.
The task never had a machine in the first case, and had one and lost it in the second.
Why
PENDING->RUNNINGmeans two unrelated things, and the metric cannot tell them apart:PENDING->RUNNINGruns at ~300/hour, so a[5m]alert window holds ~25 samples — andp99 of 25 samples is the single slowest one. A resumption does not have to be common to
be the number that pages someone; it has to happen once in the window.
Measured in production over 24 h:
RUNNING->PENDINGruns at 2.0/hour, p99 10,190 s.Changes
One attribute, computed from the history list the session already holds. No query, no
new I/O on the commit path.
execution.run_attemptfirstRUNNINGrepeatnoneRUNNINGnonerather than omitting the attribute: an attribute that disappears forms a secondseries that no filter on the first one covers.
"Attempt" counts times the execution held a machine, not times it was retried after an
error.
Nothing is merged and nothing is dropped — all three samples above are still recorded,
so existing queries and dashboards keep working.
Tests
["first", "repeat", "repeat"]