-
Notifications
You must be signed in to change notification settings - Fork 662
optimize lettuce plugin #17
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
Conversation
...ffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/RedisChannelWriterInterceptor.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/skywalking/apm/plugin/lettuce/v5/RedisCommandCancelMethodInterceptor.java
Outdated
Show resolved
Hide resolved
It is fine to skip that. If you want, it is better to update support list doc to mention all these. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @darcydai Do you need to update the document to mention this?
The new plugin can work with Redis standalone and Redis Sentinel and Redis cluster(old version can not). Redis cluster and Redis sentinel need to use docker-compose. I do not know how to make scenarios test in this two cluster model
where should I write this? |
|
How about adding (cluster..) after redis on this page? |
Fix
Add a unit test to verify that the fix works.
Explain briefly why the bug exists and how to fix it.
Update the
CHANGESlog.This is a big change for the lettuce plugin
Lettuce is an async Redis client base on netty, and wide use in our company.
Recently I found almost every lettuce span has the time elapsed less than 1ms and has a long gap between two spans. After reading the lettuce source code, I found the plugin some bug.
because lettuce is an async framework base on netty, old interceptor named 'RedisChannelWriterInterceptor' stop span in after method can not record the time elapsed, it should be close in 'RedisCommand#complete' or 'RedisCommand#completeExceptionally' or 'RedisCommand#cancel' called when Redis server response
lettuce plugin record nothing when lettuce work on reactive mode (project reactor)
record Redis peer in skywalking dynamic field can simplify
The new plugin can work with Redis standalone and Redis Sentinel and Redis cluster(old version can not). Redis cluster and Redis sentinel need to use docker-compose. I do not know how to make scenarios test in this two cluster model