Skip to content
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

Update Redis instrumentation to support v5 #1611

Merged
merged 7 commits into from
Nov 11, 2022
Merged

Commits on Nov 9, 2022

  1. Update Redis instrumentation to support v5

    Co-authored-by: hramadan <hramadan@newrelic.com>
    
    Redis gem 5.x comprises a major structural refactor for the library.
    
    * Calls to methods like get and set are no longer routed through `call`,
    but through a method named `call_v`
    * The methods we instrument have been moved into a new library,
    redis-client, a dependency of the redis gem.
    * Prepending onto the new library's class (::RedisClient) for the
    `call_v` and connect methods maintains consistent reporting behavior
    with earlier versions of Redis.
    * The location, behavior, and arguments of pipelined and multi
    methods changed.
    * In previous versions, pipeline and multi calls were routed through a
    method named `call_pipeline`. There is a similar method in Redis 5.x
    named `call_pipelined`. However, this method is not defined in
    ::RedisClient, preventing our prepend instrumentation from working.
    ::RedisClient defines `multi` and `pipelined` methods, but they do not
    have access to the NoSQL statement as an argument or other instance
    variable/method on the caller.
    * For `call_pipelined`, we now leverage Redis 5.x's new instrumentation
    API, `::RedisClient.register(module_name)`.
    * This process introduces instrumentation too late to capture errors at
    the segment level. Despite this shortcoming, this strategy is used for
    `pipelined` and `multi` calls because it has access to the NoSQL
    statement
    kaylareopelle committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    67f5406 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2022

  1. Configuration menu
    Copy the full SHA
    5732091 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a819851 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5a66d23 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d89e3b4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d49ef0f View commit details
    Browse the repository at this point in the history
  6. Revert "Remove redis_host method definition"

    This reverts commit d49ef0f.
    kaylareopelle committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    0d8f978 View commit details
    Browse the repository at this point in the history