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

Kamon-redis: make it work for jedis 2.x #1076

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

jtjeferreira
Copy link
Contributor

In Jedis 2.x the type is redis.clients.jedis.Protocol.Command
while in Jedis 3.x is redis.clients.jedis.commands.ProtocolCommand
(and redis.clients.jedis.Protocol.Command is the only subclass of ProtocolCommand)

However we dont need to match on it since we just use toString...

In Jedis 2.x the type is `redis.clients.jedis.Protocol.Command`
while in Jedis 3.x is `redis.clients.jedis.commands.ProtocolCommand`
(and `redis.clients.jedis.Protocol.Command` is the only subclass of `ProtocolCommand`)

However we dont need to match on it since we just use toString...
public redis.clients.jedis.Protocol.sendCommand(redis.clients.jedis.util.RedisOutputStream, redis.clients.jedis.commands.ProtocolCommand, byte[]...)

and

private redis.clients.jedis.Protocol.sendCommand(redis.clients.jedis.util.RedisOutputStream, byte[], byte[]...)
@jtjeferreira
Copy link
Contributor Author

I was getting double the spans like this
image

0b23492 fixes it

@ivantopo
Copy link
Contributor

Hey @jtjeferreira, so this will work for multiple Jedis versions?

@jtjeferreira
Copy link
Contributor Author

Hey @jtjeferreira, so this will work for multiple Jedis versions?

for jedis 2.x and 3.x. However the tests only test it for 3.x

@ivantopo ivantopo merged commit be83653 into kamon-io:master Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants