Repository navigation
Start the Zinc counter where production starts - #44
Merged
Merged
Conversation
Comparing both exports line by line turned up two differences in the counter, one of them not a difference but a defect: a fresh counter answered nil for the average duration, and nil is not a value a Prometheus scrape can parse. Before the first request, Canopy's endpoint would have served a broken line. The second: pharo-metrics seeds fifteen status codes with zero, so those series exist from the first scrape. Canopy started with an empty map, so zinc_httpResponses was absent until the first response of a kind arrived - and a counter that starts existing halfway through the day reads differently from one that starts at zero. Both now start where production starts. That makes the nil guard in adjustDuration: unreachable, and with it the first request no longer sets the baseline but moves the average by a hundredth - which is what the servers have been exporting all along. The test said it mirrored pharo-metrics and did not; it does now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Comparing both exports line by line turned up two differences in the counter, one of them not a difference but a defect: a fresh counter answered nil for the average duration, and nil is not a value a Prometheus scrape can parse. Before the first request, Canopy's endpoint would have served a broken line.
The second: pharo-metrics seeds fifteen status codes with zero, so those series exist from the first scrape. Canopy started with an empty map, so zinc_httpResponses was absent until the first response of a kind arrived - and a counter that starts existing halfway through the day reads differently from one that starts at zero.
Both now start where production starts. That makes the nil guard in adjustDuration: unreachable, and with it the first request no longer sets the baseline but moves the average by a hundredth - which is what the servers have been exporting all along. The test said it mirrored pharo-metrics and did not; it does now.