-
Notifications
You must be signed in to change notification settings - Fork 55
RCBC-526: Add support for meters #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
c1a57bf to
e2df93b
Compare
565ea8b to
98d5d52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
|
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.