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
Add [Agent] Jedis LETTUCE client plugin #832
Conversation
@lytscu Please run your test again, after ci passed. |
AbstractSpan span = ContextManager.activeSpan(); | ||
span.errorOccurred(); | ||
} | ||
ContextManager.stopSpan(); |
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.
It maybe cause exception if the commandType
equals AUTH
, because of I saw that StatefulRedisClusterConnectionImplInterceptor
doesn't create span if the commandType
equals AUTH
AbstractSpan span = ContextManager.activeSpan(); | ||
span.errorOccurred(); | ||
} | ||
ContextManager.stopSpan(); |
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.
It maybe cause exception if the command type is ignore command type, because of I saw that StatefulRedisClusterConnectionImplInterceptor
doesn't create span if the command type is ignore command type
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.
Already updated
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.
Cannot see any update
/** | ||
* Check the comandtype ,ignore "AUTH" "CLIENT" "CLUSTER" . | ||
*/ | ||
private Boolean checkIgnoreCommandType(String comandType) { |
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.
This method is make confuse. I suggest that the method name change to checkIfNotIgnoreCommandType
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.
ok
String comandType = String.valueOf(command.getType()); | ||
if (!"AUTH".equals(comandType)) { | ||
Iterable<RedisURI> redisURIs = (Iterable<RedisURI>)objInst.getSkyWalkingDynamicField(); | ||
AbstractSpan span = ContextManager.createExitSpan("REDIS-Lettuce/" + comandType, redisURIs.toString()); |
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.
I am not sure what the value about redisURIs.toString()
look like. Can you show me an example?
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.
redisURIs.toString()=[RedisURI [host='100.100.144.134', port=30001]]
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.
This is not a typical peer. In traditional, the peer like ip1:port1,ip2:port2
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.
ok
RedisCommand command = (RedisCommand)allArguments[0]; | ||
String comandType = String.valueOf(command.getType()); | ||
if (null != command.getOutput().getError()) { | ||
AbstractSpan span = ContextManager.activeSpan(); |
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.
It maybe cause exception if the command type equals AUTH
, because of I saw that StatefulRedisClusterConnectionImplInterceptor
doesn't create span if the command type equals AUTH
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.
ok
MatcherAssert.assertThat(segmentStorage.getTraceSegments().size(), is(1)); | ||
TraceSegment traceSegment = segmentStorage.getTraceSegments().get(0); | ||
List<AbstractTracingSpan> spans = SegmentHelper.getSpans(traceSegment); | ||
assertMongoSpan(spans.get(0)); |
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.
The method name should be assertLettuceSpan
|
||
interceptor = new StatefulRedisConnectionImplInterceptor(); | ||
|
||
Config.Plugin.MongoDB.TRACE_PARAM = true; |
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.
I think this line should be remove
|
||
@Override public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, | ||
Class<?>[] argumentsTypes, Throwable t) { | ||
AbstractSpan span = ContextManager.activeSpan(); |
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.
I think this should also check the command type
|
||
@Override public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, | ||
Class<?>[] argumentsTypes, Throwable t) { | ||
AbstractSpan span = ContextManager.activeSpan(); |
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.
I think this should also check the command type
Could you post the latest test report? @lytscu |
+1 I agree we should run the test again before merge. |
I move this pr to 5.0.0 beta, because our codes of 5.0.0 alpha is about to be frozen. @lytscu |
The duration of |
@lytscu Would you continue work on this pr? |
Closing this, no update more than 3 months. |
Please answer these questions before submitting pull request
Why submit this pull request?
New feature provided
Related issues
Jedis LETTUCE client plugin Jedis LETTUCE client plugin #766
Bug fix
Bug description.
How to fix?
New feature or improvement
https://github.com/SkywalkingTest/agent-integration-test-report/blob/master/2018/2/lytscu/testReport-master-2018-02-27-09-16.md