dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

Redisson trace reports all operations as EVAL

Open gokhanoner opened this issue 2 years ago • 6 comments

tested with 0.97.0

When used with Redisson 3.10+ client, all operations reported as EVAL. Screen Shot 2022-03-12 at 12 49 54 AM

when using opentracing-redis-redisson library, operations are clear + there's metadata attached, cache name & key name while DataDog doesn't have any metadata attached to operation, it makes it hard to make sense of the data. Screen Shot 2022-03-12 at 4 48 58 AM

gokhanoner avatar Mar 12 '22 12:03 gokhanoner

Hi @gokhanoner thanks for the report. Would you be able to help us reproduce this issue by providing a when clause for one of our tests that produces this issue: https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/instrumentation/redisson-2.0.0/src/test/redissonLatest/groovy/RedissonClientTest.groovy

That would really help. Alternatively you could reach out to [email protected] so we can do that code sharing privately.

devinsba avatar Mar 14 '22 12:03 devinsba

@devinsba its already there -> https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/instrumentation/redisson-2.0.0/src/test/redissonLatest/groovy/RedissonClientTest.groovy#L344

I'm using only map operations, map get/put, all Im getting is this:

Screen Shot 2022-03-14 at 10 54 35 PM

When using opentracing-redisson library, here's the details I can see

Screen Shot 2022-03-14 at 10 54 18 PM

So I'm expecting to see actual operation & some more metadata, like map name & key name..

gokhanoner avatar Mar 15 '22 05:03 gokhanoner

@devinsba any update? Does this info enough?

gokhanoner avatar Mar 23 '22 19:03 gokhanoner

Hi @gokhanoner, thanks for the information. I took a quick look at the opentracing-redis-redisson library, and it's actually wrapping all the redisson data structures with ones that create spans for the different operations. That is quite a few wrapper classes, and we currently have no plans for adding that level of wrapping.

bantonsson avatar Mar 24 '22 09:03 bantonsson

It is unfortunate Redisson uses custom lua scripts for maps, when adding support I was mostly using their concept of buckets which does just use redis SET and GET commands. @bantonsson if I were to get time at some point to start looking at this do you think it makes sense to add additional span tags (maybe redisson.operationName and redisson.resourceName)? It would feel a little wrong to change the resourceName to something that is not a redis command.

I guess have we done something like this is the past for packages that add these kinds of abstractions?

billgowendavis avatar Mar 30 '22 04:03 billgowendavis

@billgowendavis I really don't know enough about either redisson or redis to have an opinion about what information you would want where. Looking at other things like the rabbitmq amqp instrumentation we set the resource name to a mix of the command and the queue, while in cassandra client we set the resource name to the query.

bantonsson avatar Mar 31 '22 15:03 bantonsson