newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
202 stars 144 forks source link

Support For Redis Running In Cluster Mode #1483

Open elucus opened 1 year ago

elucus commented 1 year ago

After testing our current Redis instrumentation it was found that StatefulRedisConnectionImpl is instrumented, however we do not pick up the StatefulRedisClusterConnectionImpl method and it was determined that our agent does not currently support Redis clusters. Ideally we would like it if the agent instrumentation included the following:

  1. Support Redis clusters;
  2. Support multiple Redis clusters in the NR "Databases" UI 2.1 Option 1: DynamoDB-like approach: when a traced command has a Redis name in it, e.g., "Redis my-awesome-cluster EVALSHA"; 2.2 Option 2: "Databases" dropdown has various Redis names. Instead of the current generic "Redis", it could be "Redis my-awesome-cluster"; 2.3 Either way, it would be helpful if we could pass arbitrary Redis names because Elasticache Redis generates long and ugly endpoints, e.g., "clustercfg.my-awesome-cluster.penf5r.use1.cache.amazonaws.com".
  3. Possibility to "enrich" traced Reids commands with custom names, e.g., Redis EVALSHA[GET_SOME_INFO] or Redis GET[READ_USER_DATA]
  4. It seems that only reactive and async commands are instrumented by AbstractRedisReactiveCommands and AbstractRedisAsyncCommands, respectively. But Lettuce also exposes a synchronous way of communicating with Redis. Synchronous API is most likely just a wrapper around an async one under the hood, but just in case, we would like to ensure that a sync API is also covered.
workato-integration[bot] commented 1 year ago

https://issues.newrelic.com/browse/NR-158759

kford-newrelic commented 1 year ago

Consider supporting both Lettuce and Jedis drivers.