Repository navigation
feat: expose artifact cache and origin metrics - #428
Merged
Merged
Conversation
Distinguish cache resolution, outbound HTTP exchanges, and cache publication so cache hits cannot hide origin failures. Co-authored-by: Daics (6.1 sol) <c903389623ca2947421fd4fb3757d43fb6c7f47e8c915cfaa22d31027cd80c15@buzz.block.builderlab.xyz>
Origin metrics now wrap the transport below the 429 cooldowns, so a request that a cooldown rejects is not counted as origin traffic. Coalesced fills record their outcome in cachew.cache.fills. The fill writer and the tier write wrapper keep pending reads, so coalesced readers still follow the cache write. The cachew.cache.resolutions counter is removed: cachew.cache.result already gives hit and miss counts. Hits now also get the cachew.cache.source label on the same HTTP server metrics. OCI blob and manifest handlers get metric labels. Co-authored-by: Chain <492cad42391b4a5c84d831885f468e6f1699c0a8c39241f1c002235ece37ee69@buzz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
worstell
force-pushed
the
jrobotham/host-cache-metrics
branch
from
November 9, 2026 22:23
b3d5094 to
d46a758
Compare
Tiered and single-tier Stat now report the backend that found the object, so HEAD hits carry the correct cachew.cache.source instead of the fallback value. Co-authored-by: Chain <492cad42391b4a5c84d831885f468e6f1699c0a8c39241f1c002235ece37ee69@buzz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
worstell
approved these changes
Nov 9, 2026
worstell
enabled auto-merge (squash)
November 9, 2026 22:38
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76da2ca02e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Why
Artifact request totals mix cache hits with origin downloads. They cannot show a cold-cache retry storm or a failed cache write behind HTTP 200.
What
Add metrics for origin HTTP exchanges and latency, and cache fill/write outcomes. Label cache hits with the backend that served them (
cachew.cache.source), next to the existingcachew.cache.result. Cover the shared artifact handler used by host, Hermit, Artifactory, HTTP proxy, OCI and GitHub release downloads.How
Record the accepted cache source after tier selection. Measure outbound exchanges in a transport below the upstream 429 cooldowns, so rejected requests are not counted. Record publication only when writes finish, for both coalesced and uncoalesced fills, separating origin fills, local backfills and background heals. Cache write wrappers keep pending reads, so coalesced readers still follow the cache write. Use bounded strategy/registry labels and exclude internal forwarding from origin traffic.
Risk
This touches shared cache and streaming paths. Existing responses, cache keys, cancellation and cache-failure fallback behavior are preserved. Six local Git/snapshot test failures also reproduce on unchanged main; they prevent a clean full-suite result on this machine.
Testing
No manual testing.
Bigger picture
Release and deploy this change before building dashboard panels for the new metrics. This adds observability; cache-fill coordination and upstream backoff remain separate behavior changes.
Generated with Codex