fix java doc issue

This commit is contained in:
ascrutae 2017-03-08 06:25:52 +08:00
parent 8c5b1e8cb8
commit c4b610982e
2 changed files with 10 additions and 14 deletions

View File

@ -14,12 +14,11 @@ import com.weibo.api.motan.rpc.Request;
import com.weibo.api.motan.rpc.Response;
import com.weibo.api.motan.rpc.URL;
/**
* Current trace segment will ref the trace segment from previous level if the serialized context data that fetch
* from {@link Request#getAttachments()} is not null.
*
* {@link MotanConsumerInterceptor} intercept all constructor of {@link com.weibo.api.motan.rpc.AbstractProvider} for record
* the request url from consumer side.
* {@link MotanProviderInterceptor} create span by fetch request url from
* {@link EnhancedClassInstanceContext#context} and transport serialized context
* data to provider side through {@link Request#setAttachment(String, String)}.
*
* @author zhangxin
*/
@ -48,7 +47,7 @@ public class MotanConsumerInterceptor implements InstanceConstructorInterceptor,
public void beforeMethod(EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext,
MethodInterceptResult result) {
URL url = (URL) context.get(KEY_NAME_OF_REQUEST_URL);
com.weibo.api.motan.rpc.Request request = (com.weibo.api.motan.rpc.Request) interceptorContext.allArguments()[0];
Request request = (Request) interceptorContext.allArguments()[0];
if (url != null) {
Span span = ContextManager.INSTANCE.createSpan(generateOperationName(url, request));
Tags.PEER_HOST.set(span, url.getHost());

View File

@ -13,19 +13,16 @@ import com.weibo.api.motan.rpc.Request;
import com.weibo.api.motan.rpc.Response;
/**
* {@link MotanProviderInterceptor} create span by fetch request url from
* {@link EnhancedClassInstanceContext#context} and transport serialized context
* data to provider side through {@link Request#setAttachment(String, String)}.
* Current trace segment will ref the trace segment if the serialized trace context that fetch
* from {@link Request#getAttachments()} is not null.
*
* {@link MotanConsumerInterceptor} intercept all constructor of {@link com.weibo.api.motan.rpc.AbstractProvider} for record
* the request url from consumer side.
*
* @author zhangxin
*/
public class MotanProviderInterceptor implements InstanceMethodsAroundInterceptor {
/**
* Context name of request url in {@link EnhancedClassInstanceContext#context}.
*/
private static final String CONTEXT_NAME_OF_REQUEST_URL = "REQUEST_URL";
/**
* Attachment key of the serialized context data.
*/