mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-18 01:06:03 +10:00
[유치수] [NOBTS] change rpcnames string to upper case.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@733 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -79,15 +79,12 @@ public class ArcusClientModifier extends AbstractModifier {
|
||||
*/
|
||||
code.append("if (newState == net.spy.memcached.ops.OperationState.READING) {");
|
||||
|
||||
// TODO: remove, debugging
|
||||
code.append("System.out.println(\"\\n\\n\\nINVOKE ARCUS BEFORE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");");
|
||||
|
||||
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(" }");
|
||||
code.append(" com.profiler.context.Trace.recordRpcName(\"arcus\", \"\");");
|
||||
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(" com.profiler.StopWatch.start(this.hashCode());");
|
||||
code.append(" com.profiler.context.Trace.record(com.profiler.context.Annotation.ClientSend, System.nanoTime() - __commandCreatedTime);");
|
||||
@@ -98,9 +95,6 @@ public class ArcusClientModifier extends AbstractModifier {
|
||||
code.append("} else if (newState == net.spy.memcached.ops.OperationState.COMPLETE || newState == net.spy.memcached.ops.OperationState.TIMEDOUT) {");
|
||||
code.append(" com.profiler.context.Trace.record(com.profiler.context.Annotation.ClientRecv, com.profiler.StopWatch.stopAndGetElapsed(this.hashCode()));");
|
||||
|
||||
// TODO: remove, debugging
|
||||
code.append("System.out.println(\"\\n\\n\\nINVOKE ARCUS AFTER ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");");
|
||||
|
||||
code.append("}");
|
||||
|
||||
// code.append("com.profiler.context.Trace.traceBlockEnd();");
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ 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(request.getProtocolVersion().toString(), request.toString());
|
||||
Trace.recordRpcName(request.getProtocolVersion().toString(), request.getRequestLine().getUri());
|
||||
Trace.recordEndPoint(request.getProtocolVersion().toString() + ":" + host.getHostName() + ":" + host.getPort());
|
||||
Trace.recordAttibute("http.url", request.toString());
|
||||
Trace.record(Annotation.ClientSend);
|
||||
|
||||
+8
-5
@@ -1,5 +1,12 @@
|
||||
package com.profiler.modifier.db.interceptor;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.profiler.context.Annotation;
|
||||
import com.profiler.context.Trace;
|
||||
import com.profiler.interceptor.StaticAroundInterceptor;
|
||||
@@ -7,10 +14,6 @@ import com.profiler.util.InterceptorUtils;
|
||||
import com.profiler.util.MetaObject;
|
||||
import com.profiler.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class PreparedStatementExecuteQueryInterceptor implements StaticAroundInterceptor {
|
||||
|
||||
private final Logger logger = Logger.getLogger(PreparedStatementExecuteQueryInterceptor.class.getName());
|
||||
@@ -32,7 +35,7 @@ public class PreparedStatementExecuteQueryInterceptor implements StaticAroundInt
|
||||
Trace.traceBlockBegin();
|
||||
try {
|
||||
String url = getUrl.invoke(target);
|
||||
Trace.recordRpcName("mysql", url);
|
||||
Trace.recordRpcName("MYSQL", url);
|
||||
|
||||
String sql = getSql.invoke(target);
|
||||
Trace.recordAttibute("PreparedStatement", sql);
|
||||
|
||||
+5
-5
@@ -1,5 +1,9 @@
|
||||
package com.profiler.modifier.db.interceptor;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.profiler.StopWatch;
|
||||
import com.profiler.context.Annotation;
|
||||
import com.profiler.context.Trace;
|
||||
@@ -8,10 +12,6 @@ import com.profiler.util.InterceptorUtils;
|
||||
import com.profiler.util.MetaObject;
|
||||
import com.profiler.util.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author netspider
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ public class StatementExecuteQueryInterceptor implements StaticAroundInterceptor
|
||||
* If method was not called by request handler, we skip tagging.
|
||||
*/
|
||||
String url = (String) this.getUrl.invoke(target);
|
||||
Trace.recordRpcName("mysql", url);
|
||||
Trace.recordRpcName("MYSQL", url);
|
||||
|
||||
if (args.length > 0) {
|
||||
Trace.recordAttibute("Statement", args[0]);
|
||||
|
||||
+5
-5
@@ -1,5 +1,9 @@
|
||||
package com.profiler.modifier.db.interceptor;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.profiler.StopWatch;
|
||||
import com.profiler.context.Annotation;
|
||||
import com.profiler.context.Trace;
|
||||
@@ -7,10 +11,6 @@ import com.profiler.interceptor.StaticAroundInterceptor;
|
||||
import com.profiler.util.MetaObject;
|
||||
import com.profiler.util.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* protected int executeUpdate(String sql, boolean isBatch, boolean returnGeneratedKeys)
|
||||
*
|
||||
@@ -34,7 +34,7 @@ public class StatementExecuteUpdateInterceptor implements StaticAroundIntercepto
|
||||
|
||||
Trace.traceBlockBegin();
|
||||
try {
|
||||
Trace.recordRpcName("mysql", "");
|
||||
Trace.recordRpcName("MYSQL", "");
|
||||
|
||||
|
||||
if (args.length > 0) {
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package com.profiler.modifier.db.interceptor;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.profiler.context.Annotation;
|
||||
import com.profiler.context.Trace;
|
||||
import com.profiler.interceptor.StaticAroundInterceptor;
|
||||
@@ -7,11 +12,6 @@ import com.profiler.util.InterceptorUtils;
|
||||
import com.profiler.util.MetaObject;
|
||||
import com.profiler.util.StringUtils;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class TransactionInterceptor implements StaticAroundInterceptor {
|
||||
|
||||
private final Logger logger = Logger.getLogger(TransactionInterceptor.class.getName());
|
||||
@@ -63,7 +63,7 @@ public class TransactionInterceptor implements StaticAroundInterceptor {
|
||||
Trace.traceBlockBegin();
|
||||
try {
|
||||
String connectionUrl = this.getUrl.invoke(target);
|
||||
Trace.recordRpcName("mysql", connectionUrl);
|
||||
Trace.recordRpcName("MYSQL", connectionUrl);
|
||||
Trace.record(Annotation.ClientSend);
|
||||
} finally {
|
||||
Trace.traceBlockEnd();
|
||||
@@ -108,7 +108,7 @@ public class TransactionInterceptor implements StaticAroundInterceptor {
|
||||
Trace.traceBlockBegin();
|
||||
try {
|
||||
String connectionUrl = this.getUrl.invoke(target);
|
||||
Trace.recordRpcName("mysql", connectionUrl);
|
||||
Trace.recordRpcName("MYSQL", connectionUrl);
|
||||
Trace.record(Annotation.ClientSend);
|
||||
} finally {
|
||||
Trace.traceBlockEnd();
|
||||
@@ -119,7 +119,7 @@ public class TransactionInterceptor implements StaticAroundInterceptor {
|
||||
Trace.traceBlockBegin();
|
||||
try {
|
||||
String connectionUrl = this.getUrl.invoke(target);
|
||||
Trace.recordRpcName("mysql", connectionUrl);
|
||||
Trace.recordRpcName("MYSQL", connectionUrl);
|
||||
|
||||
boolean success = InterceptorUtils.isSuccess(result);
|
||||
if (success) {
|
||||
@@ -144,7 +144,7 @@ public class TransactionInterceptor implements StaticAroundInterceptor {
|
||||
Trace.traceBlockBegin();
|
||||
try {
|
||||
String connectionUrl = this.getUrl.invoke(target);
|
||||
Trace.recordRpcName("mysql", connectionUrl);
|
||||
Trace.recordRpcName("MYSQL", connectionUrl);
|
||||
Trace.record(Annotation.ClientSend);
|
||||
} finally {
|
||||
Trace.traceBlockEnd();
|
||||
@@ -163,7 +163,7 @@ public class TransactionInterceptor implements StaticAroundInterceptor {
|
||||
// at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1564)
|
||||
|
||||
String connectionUrl = this.getUrl.invoke(target);
|
||||
Trace.recordRpcName("mysql", connectionUrl);
|
||||
Trace.recordRpcName("MYSQL", connectionUrl);
|
||||
|
||||
boolean success = InterceptorUtils.isSuccess(result);
|
||||
if (success) {
|
||||
|
||||
+7
-2
@@ -9,7 +9,12 @@ import java.util.logging.Logger;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.profiler.StopWatch;
|
||||
import com.profiler.context.*;
|
||||
import com.profiler.context.Annotation;
|
||||
import com.profiler.context.Header;
|
||||
import com.profiler.context.SpanID;
|
||||
import com.profiler.context.Trace;
|
||||
import com.profiler.context.TraceContext;
|
||||
import com.profiler.context.TraceID;
|
||||
import com.profiler.interceptor.StaticAroundInterceptor;
|
||||
import com.profiler.util.NumberUtils;
|
||||
import com.profiler.util.StringUtils;
|
||||
@@ -44,7 +49,7 @@ public class StandardHostValveInvokeInterceptor implements StaticAroundIntercept
|
||||
Trace.setTraceId(newTraceID);
|
||||
}
|
||||
|
||||
Trace.recordRpcName("tomcat", requestURL);
|
||||
Trace.recordRpcName("TOMCAT", requestURL);
|
||||
Trace.recordEndPoint(request.getProtocol() + ":" + request.getLocalName() + ":" + request.getLocalPort());
|
||||
Trace.recordAttibute("http.params", parameters);
|
||||
Trace.record(Annotation.ServerRecv);
|
||||
|
||||
Reference in New Issue
Block a user