fix(metrics): Increment SynchronousReadRegistryFetchCount only on registry fetch#2015
Open
ayush-panta wants to merge 1 commit into
Open
fix(metrics): Increment SynchronousReadRegistryFetchCount only on registry fetch#2015ayush-panta wants to merge 1 commit into
ayush-panta wants to merge 1 commit into
Conversation
3ba57fc to
854e863
Compare
sondavidb
reviewed
Jun 17, 2026
sondavidb
left a comment
Contributor
There was a problem hiding this comment.
Generally LGTM some small things
…istry fetch Move the metric from reader.go (fired on every ReadAt, including cache hits) to span_manager.go's getSpanContent (fired only when a span is in unrequested state and an actual network fetch is issued). Pass the layer digest into SpanManager so the metric retains its layer dimension. Signed-off-by: ayush-panta <ayushkp@amazon.com>
854e863 to
2d05489
Compare
sondavidb
approved these changes
Jun 18, 2026
sondavidb
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the work on this, LGTM. Definitely need to make sure that we call this out in our release notes since it could be confusing for folks who have relied on this metric.
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.
Issue #, if available: #1016
Description of changes: Move
SynchronousReadRegistryFetchCountmetric increment fromreader.go(fired on everyReadAt, including cache hits) tospan_manager.go'sgetSpanContent(where it fires only when a span is inunrequestedstate and an actual network fetch to the registry is issued). To preserve the layer digest dimension on the metric, the layer digest is now passed intoSpanManagerat construction time.Testing performed: Added
TestSynchronousFetchMetricOnlyFiresOnNetworkFetchunit test that verifies:getSpanContenthits an unrequested span (network fetch)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.