feat: add S3-FIFO prep metrics and instrumented backend/transport#35
Merged
Conversation
Member
wolfeidau
commented
Feb 18, 2026
- Add blob write size, upstream fetch, backend operation, and blob touch metrics to telemetry
- Introduce InstrumentedBackend wrapping filesystem backend to record backend op duration, rate, and bytes
- Add InstrumentedTransport wrapping HTTP clients to record upstream fetch duration, rate, and bytes per protocol
- Wire instrumented backend and per-protocol HTTP clients throughout server setup
- Add AccessCount field to BlobEntry with S3-FIFO 2-bit counter cap (max 3) on touch
- Expand Grafana dashboard with Storage Planning (S3-FIFO) and Backend Operations sections
* Add blob write size, upstream fetch, backend operation, and blob touch metrics to telemetry * Introduce InstrumentedBackend wrapping filesystem backend to record backend op duration, rate, and bytes * Add InstrumentedTransport wrapping HTTP clients to record upstream fetch duration, rate, and bytes per protocol * Wire instrumented backend and per-protocol HTTP clients throughout server setup * Add AccessCount field to BlobEntry with S3-FIFO 2-bit counter cap (max 3) on touch * Expand Grafana dashboard with Storage Planning (S3-FIFO) and Backend Operations sections
a0c8609 to
447596c
Compare
* Add ProtocolFromContext/WithProtocolContext to telemetry so CAFS and background goroutines can emit the correct protocol label * Change MetaDB.TouchBlob to return (int, error) and call RecordBlobTouch at every cache-hit path in CAFS, fixing the always-zero blob touch metric * Record correct outcome (4xx/5xx) for HTTP error responses in InstrumentedTransport instead of always recording "success" * Wrap Read/ReadFramed results in a countingReadCloser so backend byte counts are recorded on close rather than always being 0 * Fix outcomeFromError to use errors.Is for wrapped ErrNotFound * Add WithSumdbHTTPClient option and wire instrumented HTTP client for sumdb * Add WriterBackend and FramedBackend compile-time assertions to InstrumentedBackend * Add tests for InstrumentedBackend, InstrumentedTransport, and AccessCount cap-at-3 behaviour in BoltDB.TouchBlob
8ce54a6 to
60d0fca
Compare
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.