mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-25 20:55:59 +10:00
[유치수] [NOBTS] modify arcus modifier.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@579 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -98,6 +98,7 @@ public class Span {
|
||||
sb.append(", ServiceName=").append(serviceName);
|
||||
sb.append(", EndPoint=").append(endPoint);
|
||||
sb.append(", Annotations=").append(annotations);
|
||||
sb.append(", BinaryAnnotations=").append(binaryAnnotations);
|
||||
sb.append("}");
|
||||
|
||||
return sb.toString();
|
||||
|
||||
@@ -113,6 +113,10 @@ public final class Trace {
|
||||
annotate(annotation.getCode(), duration);
|
||||
}
|
||||
|
||||
public static void recordAttribute(final String key, final String value) {
|
||||
recordAttibute(key, (Object) value);
|
||||
}
|
||||
|
||||
public static void recordAttibute(final String key, final Object value) {
|
||||
if (!tracingEnabled)
|
||||
return;
|
||||
|
||||
@@ -84,7 +84,8 @@ public class ArcusClientModifier extends AbstractModifier {
|
||||
code.append(" java.net.InetSocketAddress addr = (java.net.InetSocketAddress) handlingNode.getSocketAddress();");
|
||||
code.append(" com.profiler.context.Trace.recordEndPoint(addr.getHostName(), addr.getPort());");
|
||||
code.append(" }");
|
||||
code.append(" com.profiler.context.Trace.recordRpcName(\"arcus\", ((cmd == null) ? \"UNKNOWN\" : new String(cmd.array())));");
|
||||
code.append(" com.profiler.context.Trace.recordRpcName(\"arcus\", \"\");");
|
||||
code.append(" com.profiler.context.Trace.recordAttribute(\"arcus.command\", ((cmd == null) ? \"UNKNOWN\" : new String(cmd.array())));");
|
||||
code.append(" System.out.println(\"CS\");");
|
||||
code.append(" com.profiler.context.Trace.record(com.profiler.context.Annotation.ClientSend);");
|
||||
code.append("} else if (newState == net.spy.memcached.ops.OperationState.COMPLETE) {");
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class ExecuteMethodInterceptor implements StaticAroundInterceptor {
|
||||
|
||||
Trace.recordRpcName("http-call", "");
|
||||
Trace.recordEndPoint(host.getHostName(), host.getPort());
|
||||
Trace.recordMessage("http.uri=" + request.toString());
|
||||
Trace.recordAttibute("http.url", request.toString());
|
||||
Trace.record(Annotation.ClientSend);
|
||||
|
||||
StopWatch.start("ExecuteMethodInterceptor");
|
||||
|
||||
Reference in New Issue
Block a user