BUG: Redis instrumentation crashes when using client.call([:command, args])
#796
Labels
bug
Involves a bug
community
Was opened by a community member
integrations
Involves tracing integrations
Milestone
Hi,
We've encountered an issue when upgrading to version 0.25.1 of the gem. We have code in our application that uses the redis-rb
Redis
classcall
method by calling it the following way:As per the docs: https://www.rubydoc.info/github/redis/redis-rb/Redis#call-instance_method.
As far as we know this is a valid way to interact with Redis, but raises an error in the following line: https://github.com/DataDog/dd-trace-rb/blob/master/lib/ddtrace/contrib/redis/quantize.rb#L30 since
command_args.first
evaluates to an Array and therefore callingto_sym
on an Array raises an error.Here's a stack trace I can provide:
We have since changed our code to use
REDIS.del("key1", "key2")
instead but we think given the other command is expected to be valid, the gem should be prepared to process it.To reproduce:
In any ddtrace enabled ruby project using redis instrumentation, open a ruby console and type:
Redis.call([:del, "key1", "key2", "key3"])
whereRedis
is a Redis client using theredis-rb
gem.Expected result:
DEL
command in RedisActual result:
Error is raised.
The text was updated successfully, but these errors were encountered: