use of org.apache.thrift.TBaseProcessor in project pinpoint by naver.
the class TBaseProcessorProcessInterceptor method getMethodUri.
private String getMethodUri(Object target) {
String methodUri = ThriftConstants.UNKNOWN_METHOD_URI;
InterceptorScopeInvocation currentTransaction = this.scope.getCurrentInvocation();
Object attachment = currentTransaction.getAttachment();
if (attachment instanceof ThriftClientCallContext && target instanceof TBaseProcessor) {
ThriftClientCallContext clientCallContext = (ThriftClientCallContext) attachment;
String methodName = clientCallContext.getMethodName();
methodUri = ThriftUtils.getProcessorNameAsUri((TBaseProcessor<?>) target);
StringBuilder sb = new StringBuilder(methodUri);
if (!methodUri.endsWith("/")) {
sb.append("/");
}
sb.append(methodName);
methodUri = sb.toString();
}
return methodUri;
}
Aggregations