-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[receiver/redisreceiver] Add support for Redis sentinel information #42401
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
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…-contrib into feat/42365 Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
|
||
// recordSentinelMetrics records metrics from Redis INFO when running in Sentinel mode. | ||
// Runs only when rs.getRedisMode(inf) == "sentinel". | ||
func (rs *redisScraper) recordSentinelMetrics(ts pcommon.Timestamp, inf info) { |
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.
Can we use existing recordCommonMetrics
instead?
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.
Yes, I improved the recordCommonMetrics
function to receive an additional parameter indicating what should be recorded. PTAL and let me know what you think.
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Description
Add support for exposing Redis sentinel and mode metrics.
Redis Sentinel metrics with Redis mode:
Redis mode (standalone):
Redis mode (cluster):
Link to tracking issue
Fixes #42365
Testing
I tested this against all the possible modes (sentinel, standalone, and cluster). The sentinel metrics are only evaluated and exposed when
redis_mode:sentinel
.I also added integration tests
TestIntegrationV8Sentinel
for thesentinel
mode.Documentation
Updated the documentation using
mdatagen