* ring: remove external rendezvous dependency by inlining implementation
Replace usage of github.com/dgryski/go-rendezvous with an internal
implementation to eliminate the external dependency and avoid licence
propagation concerns.
The implementation preserves the exact hashing algorithm and behaviour:
- same hash combination: khash ^ nhash
- same mixing function (xorshift* variant)
- same node ordering semantics
No functional changes intended.
* Refactor TestRendezvous to remove randomString function
Replaced function with inline string generation for test cases.
* test: refactor RendezvousHash tests to use Ginkgo and Gomega
* test: improve RendezvousHash test for per-instance determinism and distribution balance
* test: enhance distribution verification in RendezvousHash tests
* fix: connection closure metrics and enable all metric groups by default
This commit addresses three issues in the redisotel-native metrics implementation:
1. Fix connection closure metrics not appearing in dashboards
- Root cause: CloseConn() in internal/pool/pool.go was not calling
the metricConnectionClosedCallback when closing stale connections
- Added callback invocation in CloseConn() to record 'stale' closures
2. Verify tracing and metrics compatibility
- Added TestTracingAndMetricsCompatibility to document that
redisotel (tracing via AddHook) and redisotel-native (metrics via
SetOTelRecorder) can coexist without conflicts
3. Enable all metric groups by default
- Changed default MetricGroups from connection-basic+resiliency
to MetricGroupAll for comprehensive observability out of the box
Uses the name, desc, unit of `db.client.operation.duration`, `db.client.connection.count`, `db.client.connection.create_time`, `db.client.connection.wait_time`, `db.client.connection.pending_requests` defined by otel/semconv/v1.38.0/dbconv.
The resolves the metric description part of #3730.
Co-authored-by: ofekshenawa <[email protected]>
* chore(go): update go version to 1.24
* update readmes and ci workflows
* update dockerfile for proxy-fi-server
* address changed test behaviour
* address changed test behaviour
* First draft. One metric - command duration.
Signed-off-by: Elena Kolevska <[email protected]>
* Adds connection state metrics
Signed-off-by: Elena Kolevska <[email protected]>
* wip
Signed-off-by: Elena Kolevska <[email protected]>
* Add phase 1 metrics
* Add client api configurations
* remove redundent code
* refactor: move otel-metrics example to separate module
* refactor: move otel-metrics example to separate module
* remove internal test
* Resolve merge conflicts with upstream/master
* Fix linting issues
* Fix pool idle connection counter bug
* Add OTel performance benchmarking suite
* Improve perf compatison script
* Add phase 2,3 metrics
* Remove local benchmark tests
* Add new fields to tests
* Change db.client.connection.count and db.client.connection.pending_request metric type from UpAndDownCounter to Async gauge.
* fix golangci lint
* Add piplined commands metrics support
* Redesign otel init method
* Address comments
* Fix golangci-lint errors
* Fix passing nil pointer
* Add metric prefix to callbacks and atomic batch registration
* Add unique name for pool.name attr
* Fix unique pool name for pubsub
* Refactor all hardcoded OTel attribute strings to use constants
* Refactor all hardcoded OTel attribute strings to use constants
* extract metric names and pool names as constants, improve error handling
---------
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
* fix(rediscmd): include space in simple byte range (#3204)
* add space test
---------
Co-authored-by: fumiyanokesinn <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
* chore(go): update go version to 1.21
* chore(aggregators): make aggregators work with 1.21
* fix doctests
* address copilot comments
* use atomic bool for logic and/or aggregators
* Update .github/workflows/build.yml
Co-authored-by: ccoVeille <[email protected]>
* use stable/oldstable, 1.23 and 1.21
* fix versions in README
* add oldstable in wordlist
---------
Co-authored-by: ccoVeille <[email protected]>
* Remove metrics with empty data
Because empty data cannot be considered an error.
* redis.Nil uses a separate state.
Better differentiation between values, null values, and errors.
* feat(tracing): add process pipeline and dial filtering options for tracing
* refactor(tracing): implement default command filter and process pipeline options
* refactor(tracing): rename defaultCommandFilter to DefaultCommandFilter
* refactor(tracing): add BasicCommandFilter as a deprecated alias for DefaultCommandFilter
---------
Co-authored-by: Nedyalko Dyakov <[email protected]>
* Add support for filtering commands when tracing
Signed-off-by: Jason Parraga <[email protected]>
* Filter sensitive data by default
Signed-off-by: Jason Parraga <[email protected]>
* Address comments
Signed-off-by: Jason Parraga <[email protected]>
---------
Signed-off-by: Jason Parraga <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
* feat(redisotel): add WithCaller option
Allow the disabling the collection of the `code.function`, `code.filepath` and `code.lineno` tracing attributes.
When setting `WithCaller(false)` overall performance is increased as the "expensive" `runtime.Callers` and `runtime.(*Frames).Next` calls are no longer needed.
* chore(redisotel): improve docblock language
* chore(redisotel): rename `WithCaller` to `WithCallerEnabled`
---------
Co-authored-by: Nedyalko Dyakov <[email protected]>