Repository navigation
feat(observability): count slow status transitions by who submitted them - #410
Draft
yuechao-qin wants to merge 1 commit into
Draft
yuechao-qin wants to merge 1 commit into
yuechao-qin wants to merge 1 commit into
Conversation
yuechao-qin
force-pushed
the
ycq/observability-04-users-counter
branch
from
October 27, 2026 16:33
120f016 to
98f4699
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 latency alert can say a transition is slow. It cannot say whether that is one
automated pipeline retrying or forty people waiting. This counter answers the second
question, so an alert can carry a link to a ranked list of who is affected.
Why
The owner cannot go on the latency histogram: it multiplies every bucket of a
native-histogram series by the number of submitters. A counter written only on the slow
path costs one series per owner and is paid for by the slow transitions, not by all of
them.
Changes
execution.status_transition.slow, withexecution.status.from,execution.status.toandowner.What counts as slow
Once a task is RUNNING the clock measures work, not queueing:
Threshold:
TANGLE_SLOW_TRANSITION_SECONDS, default 6000 — a deployment sets it towhatever its own latency alert fires on.
Where the owner is read
before_commitruns inside the flush in progress, so aSELECTthere re-enters it:reaches its run through the ancestor link, a root execution has no such link to
itself, so neither half answers alone
owner="none"— analert fires on this, so a point missing one label beats no point
What is stored
One monotonic series per owner, so a raw value is a lifetime total:
…slow{from="QUEUED", to="PENDING", owner="pipeline-runner@…"}…slow{from="QUEUED", to="PENDING", owner="batch-scorer@…"}…slow{from="QUEUED", to="PENDING", owner="none"}What is viewed
sum by (owner)(increase(…[1h]))pipeline-runner@…18,batch-scorer@…6count(count by (owner)(increase(…[1h]) > 0))nonecounts as one submitter when it moves, so the headcount is a floorcreated_byis often a service account, so the honest unit is teams: a count of3 can mean three humans or three pipelines
Tests
RUNNING → SUCCEEDEDand a slowRUNNING → FAILEDare not counted, and aslow
PENDING → FAILEDstill islink; each half of the union has a test that fails without it
none, not droppedSELECT— every statement run before the owner lookup iscaptured and asserted on, which is the rule the rest of the design exists to keep