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

Add `dd.trace.db.client.split-by-instance` support for Redis

Open zBart opened this issue 4 years ago • 1 comments

We use a couple of Redis clusters and right now and we would like to see requests on a per instance basis. I noticed that currently this feature already exists for splitting DB requests per instance, but it doesn't work for Redis.

I took a quick look at the source code and I think it's because dbInstance returns null: https://github.com/DataDog/dd-trace-java/blob/6b96665bb129b123c510cb55e0b64ad40148a183/dd-java-agent/instrumentation/jedis-3.0/src/main/java/datadog/trace/instrumentation/jedis30/JedisClientDecorator.java#L48

Maybe instead the hostname of the server can be passed instead?

zBart avatar Jan 05 '21 14:01 zBart

Another thing we don't have redis hostname attribute logged. so if app is connecting to multiple redis it's just blind assumption.

rr-paras-patel avatar Oct 13 '21 18:10 rr-paras-patel