Skip to content

Declare a runtime metric on its branch, and leave out a value that is… - #49

Merged
noha merged 1 commit into
mainfrom
metrics-are-declared-in-one-place
Sep 25, 2026
Merged

noha merged 1 commit into
mainfrom
metrics-are-declared-in-one-place

Conversation

@noha

@noha noha commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

… not known

Every server spelled out the same shape by hand: an accessor whose block builds a CanopyMetric, sets its type and description and reads its value. Base, account, scheduler, AGSoilMetrics and now the metabase each had their own copy. CanopyBranchNode now says it once - gauge:description:reading:, counter:description:reading: and gauge:label:description:reading: for a map - and a server says only its name, what it means and where the number comes from.

A metric whose value is nil answers no reading. A number that is not known yet is a gap in the series, not the word nil on the scrape and not a zero that claims to know.

… not known

Every server spelled out the same shape by hand: an accessor whose block
builds a CanopyMetric, sets its type and description and reads its value.
Base, account, scheduler, AGSoilMetrics and now the metabase each had their
own copy. CanopyBranchNode now says it once - gauge:description:reading:,
counter:description:reading: and gauge:label:description:reading: for a map -
and a server says only its name, what it means and where the number comes from.

A metric whose value is nil answers no reading. A number that is not known
yet is a gap in the series, not the word nil on the scrape and not a zero
that claims to know.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noha
noha merged commit 3f66f14 into main Sep 25, 2026
4 checks passed
@noha
noha deleted the metrics-are-declared-in-one-place branch September 29, 2026 09:47
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.

1 participant