Skip to content

Let the Zinc counter be narrowed to a path - #45

Merged
noha merged 1 commit into
mainfrom
zinc-counter-can-be-narrowed-to-a-prefix
Sep 18, 2026
Merged

noha merged 1 commit into
mainfrom
zinc-counter-can-be-narrowed-to-a-prefix

Conversation

@noha

@noha noha commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

The deployed servers count only what arrives under /api - AGBaseUriSpace sets that prefix before installing the counter. Canopy's counter subscribed to every transaction, so after the migration zinc_httpRequests and zinc_httpResponses would have carried materially different numbers, the scrapes of the metrics endpoint among them. pharo-metrics says as much where it filters: left alone, a counter of HTTP requests counts the requests that read it.

Two lists rather than the single flag pharo-metrics uses, where addInclude and addExclude overwrite each other's mode and the last call wins: named prefixes narrow what is counted, excluded ones drop out of what is left, and with neither everything counts. That covers what the servers do and has no order in which it means something else.

The deployed servers count only what arrives under /api - AGBaseUriSpace sets
that prefix before installing the counter. Canopy's counter subscribed to
every transaction, so after the migration zinc_httpRequests and
zinc_httpResponses would have carried materially different numbers, the
scrapes of the metrics endpoint among them. pharo-metrics says as much where
it filters: left alone, a counter of HTTP requests counts the requests that
read it.

Two lists rather than the single flag pharo-metrics uses, where addInclude
and addExclude overwrite each other's mode and the last call wins: named
prefixes narrow what is counted, excluded ones drop out of what is left, and
with neither everything counts. That covers what the servers do and has no
order in which it means something else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noha
noha merged commit 9a09d56 into main Sep 18, 2026
4 checks passed
@noha
noha deleted the zinc-counter-can-be-narrowed-to-a-prefix branch September 21, 2026 08:40
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