Add support for redis-rb 6 - #6142
Conversation
…verbs (HELLO, CLIENT SETINFO/SETNAME)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a655e93719
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🎉 All green!🧪 All tests passed 🔄 Datadog auto-retried 1 job - 1 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: bf2b132 | Docs | Datadog PR Page | Give us feedback! |
a655e93 to
3dfa8b0
Compare
BenchmarksBenchmark execution time: 2026-08-03 13:17:13 Comparing candidate commit bf2b132 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 1 unstable metrics.
|
| # `redis-client` sends its per-connection handshake (`HELLO`, `CLIENT SETINFO`/`SETNAME`) | ||
| # as a pipeline through this same code path. Excluding those from resource naming keeps | ||
| # the resource focused on application-issued commands (e.g. a lone `SELECT` prelude). | ||
| traced_commands = commands.reject { |c| Contrib::Redis::Quantize.connection_setup_command?(c) } |
There was a problem hiding this comment.
nit: Is it possible for connection_setup_command to process something that throws an error? If so, some error handling for this line could be useful.
| # `redis-client` always emits this as `["HELLO", "3", "AUTH", username, password]` — check | ||
| # the fixed "AUTH" keyword position only, never the username/password values themselves, | ||
| # since those are untrusted, possibly-binary bulk strings that `#upcase` can raise on. | ||
| command_args.first.to_s.upcase == "HELLO" && command_args[2].to_s.upcase == "AUTH" |
There was a problem hiding this comment.
Two different style of array access in a single line command_args.first and command_args[2], let's just use one, command_args[0] and command_args[2]
What does this PR do?
Add support for redis-rb 6 by stripping the per-connection handshake verbs (HELLO, CLIENT SETINFO/SETNAME)
Motivation:
Ci failed in #6141
Change log entry
Yes. Add support for redis-rb 6.0/RESP3
Additional Notes:
How to test the change?