Skip to content

feat: add S3-FIFO prep metrics and instrumented backend/transport#35

Merged
wolfeidau merged 2 commits into
mainfrom
feat_s3fifo_prep
Feb 20, 2026
Merged

feat: add S3-FIFO prep metrics and instrumented backend/transport#35
wolfeidau merged 2 commits into
mainfrom
feat_s3fifo_prep

Conversation

@wolfeidau
Copy link
Copy Markdown
Member

  • 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
* 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
@wolfeidau wolfeidau merged commit d2dde48 into main Feb 20, 2026
1 check passed
@wolfeidau wolfeidau deleted the feat_s3fifo_prep branch February 20, 2026 09:10
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