Repository navigation
feat: a window says what changed (ADR 0089) - #133
Merged
Merged
Conversation
The half ADR 0088 named and left. Every counter in `collection_coverage` is cumulative from `since`, which answers how much and never when: a namespace annotated an hour ago and one annotated three weeks ago reach the same total, and the counter that explains a workload's missing data cannot say whether the explanation is today's. `agent_counters` is one record per (window, counter), hour-aligned, carrying the rise within the window and how much of it the agent was running to count. The counter's name is the dotted path that number has where it is reported cumulatively, so the payload says when and never restates what. Where a subtraction belongs was settled once already: ADR 0062 put the /proc counter subtraction on the node and set the rule that matters more than the arithmetic — three cases produce no delta rather than a wrong one. Same shape here with `since` as the key: a pass whose base moved accrues nothing, and a counter that fell under an unchanged base accrues nothing either. The counter list is closed and each exclusion is argued in the ADR rather than being "every number we have". The shipping counters are out for a reason worth naming: the backend issued those statuses itself and saw the gaps in `captured_at` itself, so a window here would tell it what it already wrote down. go test -race ./... all packages ok go vet -tags e2e ./... clean GOOS=linux golangci-lint run 0 issues Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeZECJXTDHL6Nts95eKMJA
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.
The half ADR 0088 named and left. Completes the "when" work.
The gap
Every counter in
collection_coverageis cumulative fromsince:A namespace annotated an hour ago and one annotated three weeks ago produce the
same twelve. When a customer's data stops arriving for a workload, the counter
that explains it cannot say whether the explanation is today's.
Differencing successive payloads does not rescue it: the kind supersedes, so a
history is something the backend was never asked to keep; a restart moves
sinceand starts the counters over; and the resolution would be whatever ithappened to retain.
What ships
agent_counters— one record per(window, counter), hour-aligned,superseding, the same shape as
agent_statesso it resumes through the samemachinery and the backend implements one thing twice rather than two things.
The counter's name is the dotted path that number has where it is reported
cumulatively —
filter.excluded_pod_annotation,pprof_pull.refused. The nameis the join, so this payload says when and never restates what: each
number's meaning stays in the one place that already documents it.
The subtraction was decided once already
ADR 0062 moved the
/proccounter subtraction onto the node and set the rulethat matters more than the arithmetic: three cases produce no delta rather
than a wrong one. Same shape here, with
sincein the role of the processstart time:
readings belong to different processes and are not subtractable;
it to subtract from.
And one rule the durations do not need: the interval splits at a window
boundary because it is a duration; the rise does not, because it happened at an
instant no pass can see. Splitting it by elapsed time would invent that instant.
The counter list is closed, and each exclusion is argued
In the ADR rather than as a hunch. The shipping counters are out for the reason
worth repeating here: the backend issued those statuses itself and saw the gaps
in
captured_atitself, so a window of them would tell it what it alreadywrote down.
Also out: the placement and node drops (shape of the data, not behaviour over
time); the endpoint and goroutine coverages (targets by latest answer — a
snapshot, and subtracting two snapshots gives a number with no referent); and
the inventory/scan/eBPF blocks (per-node aggregates nothing may subtract across
a changing set of nodes).
What it still cannot say
Under its own heading in ADR 0089: a restart loses the rises inside its own gap
— the new process's counters start at zero, so no reading anywhere spans the
outage, and
observed_nanosis what makes that hole visible rather than silent.A rise within one pass of a boundary may land in the later window. And a delta
counts decisions, not objects, inheriting that exactly from the counters it is
derived from.
Evidence
🤖 Generated with Claude Code
https://claude.ai/code/session_01KeZECJXTDHL6Nts95eKMJA