Skip to content

enhance: add labeled filesystem metrics observability - #592

Open
tedxu wants to merge 1 commit into
milvus-io:mainfrom
tedxu:enhance/fs-metrics-observability
Open

enhance: add labeled filesystem metrics observability#592
tedxu wants to merge 1 commit into
milvus-io:mainfrom
tedxu:enhance/fs-metrics-observability

Conversation

@tedxu

@tedxu tedxu commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

See #591

Replace the flat 13-counter FilesystemMetrics with a labeled registry
keyed by operation type and status. Adds per-op latency and payload
size histograms, error classification, retry counts, and saturation
gauges (in-flight, connections, pending multipart).

A RAII ScopedOp measures exactly one backend request; ScopedXfer adds
payload-size recording for the transfer ops (Read, Write,
MultipartUploadPart). Local, S3 (sync and CRT async), and Azure paths
are instrumented, with per-backend error classification.

The C FFI exports a fixed-size snapshot carrying sum, count, and
static bucket bounds so a consumer can rebuild Prometheus histograms,
plus a legacy shim so the milvus bridge keeps building until it
migrates. Read-only Get* accessors are retained as helpers derived
from the registry, preserving the prior counters' semantics for
in-repo consumers (benchmarks and filesystem tests).

Design docs/filesystem-metrics-observability-design.md.

@sre-ci-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tedxu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.94581% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.09%. Comparing base (4e697a0) to head (cc84e9a).

Files with missing lines Patch % Lines
cpp/src/filesystem/local_fs_producer.cpp 68.96% 27 Missing ⚠️
cpp/src/filesystem/azure/azurefs.cc 82.25% 11 Missing ⚠️
cpp/include/milvus-storage/filesystem/observable.h 93.58% 10 Missing ⚠️
cpp/src/filesystem/s3/s3_client.cpp 81.48% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #592      +/-   ##
==========================================
+ Coverage   75.95%   76.09%   +0.13%     
==========================================
  Files         168      171       +3     
  Lines       16672    16912     +240     
  Branches     2510     2570      +60     
==========================================
+ Hits        12664    12869     +205     
- Misses       4008     4043      +35     
Flag Coverage Δ
cpp 78.76% <86.94%> (+0.10%) ⬆️
python 44.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tedxu
tedxu force-pushed the enhance/fs-metrics-observability branch from 29cca0b to abe0059 Compare July 27, 2026 13:07
Replace the flat 13-counter FilesystemMetrics with a labeled
registry keyed by operation type and status. Adds per-op latency
and payload-size histograms, error classification, retry counts,
and saturation gauges (in-flight, connections, pending multipart).

A RAII ScopedOp measures one backend request; ScopedXfer adds
payload-size recording for Read, Write, and MultipartUploadPart.
Local, S3 (sync and CRT async), and Azure paths are instrumented.

The FFI exports a fixed-size snapshot with sum, count, and static
bucket bounds, plus a legacy shim so the milvus bridge keeps
building. Read-only Get* accessors are retained as derived helpers
for in-repo consumers with their prior semantics.

Adds design and implementation docs and unit tests for the
histogram, registry, error classification, and FFI snapshot.

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
@tedxu
tedxu force-pushed the enhance/fs-metrics-observability branch from abe0059 to cc84e9a Compare July 28, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants