提交 61f8d3ee 编写于 作者: L lytscu

Update afterMethod exception status

上级 2e95e7ff
......@@ -53,10 +53,8 @@ public class ProducerOperationHandlerInterceptor implements InstanceMethodsAroun
}
String operationName = invocation.getMicroserviceQualifiedName();
AbstractSpan span = ContextManager.createEntrySpan(operationName, contextCarrier);
if (null != invocation.getOperationMeta() && null != invocation.getOperationMeta().getOperationPath()) {
String url = invocation.getOperationMeta().getOperationPath();
Tags.URL.set(span, url);
}
String url = invocation.getOperationMeta().getOperationPath();
Tags.URL.set(span, url);
span.setComponent(ComponentsDefine.SERVICECOMB);
SpanLayer.asRPCFramework(span);
}
......@@ -64,6 +62,9 @@ public class ProducerOperationHandlerInterceptor implements InstanceMethodsAroun
@Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Object ret) throws Throwable {
Invocation invocation = (Invocation)allArguments[0];
if (null == invocation.getOperationMeta()) {
return ret;
}
AbstractSpan span = ContextManager.activeSpan();
int statusCode = invocation.getStatus().getStatusCode();
if (statusCode >= 400) {
......
......@@ -65,6 +65,9 @@ public class TransportClientHandlerInterceptor implements InstanceMethodsAroundI
@Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Object ret) throws Throwable {
Invocation invocation = (Invocation)allArguments[0];
if (null == invocation.getOperationMeta() || null == invocation.getEndpoint()) {
return ret;
}
AbstractSpan span = ContextManager.activeSpan();
int statusCode = invocation.getStatus().getStatusCode();
if (statusCode >= 400) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册