RCBC-526: Add support for meters#197
Merged
DemetrisChr merged 1 commit intocouchbase:mainfrom Jan 9, 2026
Merged
Conversation
c1a57bf to
e2df93b
Compare
565ea8b to
98d5d52
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for metrics collection in the Couchbase Ruby SDK. The implementation introduces a meter abstraction with logging and noop implementations, along with test utilities for metrics verification.
Key changes:
- Added metrics infrastructure with
MeterandValueRecorderinterfaces - Integrated metrics collection into the observability layer to track operation durations
- Added HDR histogram implementation for efficient percentile calculations
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/couchbase/metrics/*.rb | Core metrics interfaces (Meter, ValueRecorder) and implementations (NoopMeter, LoggingMeter) |
| lib/couchbase/utils/observability.rb | Integrated metrics collection into operation tracking with error handling |
| lib/couchbase/options.rb | Added meter configuration option to Cluster options |
| lib/couchbase/cluster.rb | Wired up meter initialization with LoggingMeter as default |
| lib/couchbase/utils/hdr_histogram.rb | Ruby wrapper for HDR histogram percentile calculations |
| ext/rcb_hdr_histogram.* | C++ extension for HDR histogram functionality |
| test/utils/metrics/*.rb | Test utilities for metrics verification |
| test/*_test.rb | Integration tests for metrics collection |
| ext/rcb_backend.cxx | Disabled core-level metrics in favor of wrapper-side handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
98d5d52 to
485973e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
485973e to
d55f789
Compare
avsej
approved these changes
Jan 8, 2026
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.
Motivation
As part of the observability work, we need to add support for collecting metrics, following the Extended Observability RFC.
Changes
MeterandValueRecorderabstract base classesLoggingMeterimplementation. This utilizes the HDR Histogram Ruby bindings.