mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-17 00:36:02 +10:00
[유치수] [NOBTS] change arcus modifier : protocol code to uppercase
change httpclient modifier : get protocol version. git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@730 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -73,17 +73,6 @@ public class ArcusClientModifier extends AbstractModifier {
|
||||
*/
|
||||
code.append("com.profiler.context.Trace.setTraceId(__nextTraceId);");
|
||||
|
||||
// code.append("System.out.println(__traceId);");
|
||||
// code.append("System.out.println($1);");
|
||||
// code.append("System.out.println(\"Change state \" + state + \" -> \" + newState);");
|
||||
// code.append("System.out.println(handlingNode);");
|
||||
// code.append("System.out.println(\"cmd=\" + ((cmd == null) ? null : new String(cmd.array())));");
|
||||
// code.append("System.out.println(Thread.currentThread().getId());");
|
||||
// code.append("System.out.println(Thread.currentThread().getName());");
|
||||
// code.append("System.out.println(\"\");");
|
||||
// code.append("System.out.println(\"\");");
|
||||
// code.append("System.out.println(\"\");");
|
||||
|
||||
/**
|
||||
* After sending command to the Arcus server. now waiting server
|
||||
* response.
|
||||
@@ -96,7 +85,7 @@ public class ArcusClientModifier extends AbstractModifier {
|
||||
code.append(" java.net.SocketAddress socketAddress = handlingNode.getSocketAddress();");
|
||||
code.append(" if (socketAddress instanceof java.net.InetSocketAddress) {");
|
||||
code.append(" java.net.InetSocketAddress addr = (java.net.InetSocketAddress) handlingNode.getSocketAddress();");
|
||||
code.append(" com.profiler.context.Trace.recordEndPoint(\"arcus:\" + addr.getHostName() + \":\" + addr.getPort());");
|
||||
code.append(" com.profiler.context.Trace.recordEndPoint(\"ARCUS:\" + addr.getHostName() + \":\" + addr.getPort());");
|
||||
code.append(" }");
|
||||
code.append(" com.profiler.context.Trace.recordRpcName(\"arcus\", \"\");");
|
||||
code.append(" com.profiler.context.Trace.recordAttribute(\"arcus.command\", ((cmd == null) ? \"UNKNOWN\" : new String(cmd.array())));");
|
||||
|
||||
+2
-6
@@ -27,8 +27,6 @@ public class ExecuteMethodInterceptor implements StaticAroundInterceptor {
|
||||
|
||||
@Override
|
||||
public void before(Object target, String className, String methodName, String parameterDescription, Object[] args) {
|
||||
System.out.println("\n\n\n\nINVOKE HTTP START ----------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||
|
||||
final HttpHost host = (HttpHost) args[0];
|
||||
final HttpRequest request = (HttpRequest) args[1];
|
||||
|
||||
@@ -43,8 +41,8 @@ public class ExecuteMethodInterceptor implements StaticAroundInterceptor {
|
||||
request.addHeader(Header.HTTP_SAMPLED.toString(), String.valueOf(nextId.isSampled()));
|
||||
request.addHeader(Header.HTTP_FLAGS.toString(), String.valueOf(nextId.getFlags()));
|
||||
|
||||
Trace.recordRpcName("http-call", "");
|
||||
Trace.recordEndPoint("http:" + host.getHostName() + ":" + host.getPort());
|
||||
Trace.recordRpcName(request.getProtocolVersion().toString(), request.toString());
|
||||
Trace.recordEndPoint(request.getProtocolVersion().toString() + ":" + host.getHostName() + ":" + host.getPort());
|
||||
Trace.recordAttibute("http.url", request.toString());
|
||||
Trace.record(Annotation.ClientSend);
|
||||
} finally {
|
||||
@@ -59,7 +57,5 @@ public class ExecuteMethodInterceptor implements StaticAroundInterceptor {
|
||||
Trace.traceBlockBegin();
|
||||
Trace.record(Annotation.ClientRecv, StopWatch.stopAndGetElapsed("ExecuteMethodInterceptor"));
|
||||
Trace.traceBlockEnd();
|
||||
|
||||
System.out.println("\n\n\n\nINVOKE HTTP END ----------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -43,9 +43,9 @@ public class StandardHostValveInvokeInterceptor implements StaticAroundIntercept
|
||||
}
|
||||
Trace.setTraceId(newTraceID);
|
||||
}
|
||||
|
||||
|
||||
Trace.recordRpcName("tomcat", requestURL);
|
||||
Trace.recordEndPoint(request.getProtocol() + ":" + request.getLocalAddr() + ":" + request.getLocalPort());
|
||||
Trace.recordEndPoint(request.getProtocol() + ":" + request.getLocalName() + ":" + request.getLocalPort());
|
||||
Trace.recordAttibute("http.params", parameters);
|
||||
Trace.record(Annotation.ServerRecv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user