提交 ae9bc45c 编写于 作者: wu-sheng's avatar wu-sheng

Fix compile issues.

上级 5ff9a698
...@@ -53,10 +53,10 @@ public class Span { ...@@ -53,10 +53,10 @@ public class Span {
private String operationName; private String operationName;
/** /**
* {@link #peer_host}, {@link #port} and {@link #peers} were part of tags, * {@link #peerHost}, {@link #port} and {@link #peers} were part of tags,
* independence them from tags for better performance and gc. * independence them from tags for better performance and gc.
*/ */
private String peer_host; private String peerHost;
private int port; private int port;
...@@ -335,7 +335,7 @@ public class Span { ...@@ -335,7 +335,7 @@ public class Span {
} }
public String getPeerHost() { public String getPeerHost() {
return peer_host; return peerHost;
} }
public int getPort() { public int getPort() {
...@@ -346,8 +346,8 @@ public class Span { ...@@ -346,8 +346,8 @@ public class Span {
return peers; return peers;
} }
public void setPeer_host(String peer_host) { public void setPeerHost(String peerHost) {
this.peer_host = peer_host; this.peerHost = peerHost;
} }
public void setPort(int port) { public void setPort(int port) {
...@@ -391,9 +391,9 @@ public class Span { ...@@ -391,9 +391,9 @@ public class Span {
JsonObject tagWithStr = null; JsonObject tagWithStr = null;
JsonObject tagWithInt = null; JsonObject tagWithInt = null;
JsonObject tagWithBool = null; JsonObject tagWithBool = null;
if (!StringUtil.isEmpty(span.peer_host)) { if (!StringUtil.isEmpty(span.peerHost)) {
tagWithStr = new JsonObject(); tagWithStr = new JsonObject();
tagWithStr.addProperty("peer.host", span.peer_host); tagWithStr.addProperty("peer.host", span.peerHost);
tagWithInt = new JsonObject(); tagWithInt = new JsonObject();
tagWithInt.addProperty("peer.port", span.port); tagWithInt.addProperty("peer.port", span.port);
} else if (!StringUtil.isEmpty(span.peers)) { } else if (!StringUtil.isEmpty(span.peers)) {
......
...@@ -44,7 +44,7 @@ public class SpanTestCase { ...@@ -44,7 +44,7 @@ public class SpanTestCase {
Span span1 = new Span(0, "serviceA"); Span span1 = new Span(0, "serviceA");
Tags.SPAN_LAYER.asHttp(span1); Tags.SPAN_LAYER.asHttp(span1);
Tags.COMPONENT.set(span1, "Spring"); Tags.COMPONENT.set(span1, "Spring");
span1.setPeer_host("127.0.0.1"); span1.setPeerHost("127.0.0.1");
Tags.ERROR.set(span1, true); Tags.ERROR.set(span1, true);
Tags.STATUS_CODE.set(span1, 302); Tags.STATUS_CODE.set(span1, 302);
Tags.URL.set(span1, "http://127.0.0.1/serviceA"); Tags.URL.set(span1, "http://127.0.0.1/serviceA");
......
...@@ -54,8 +54,8 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor { ...@@ -54,8 +54,8 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor {
Tags.URL.set(span, generateRequestURL(requestURL, invocation)); Tags.URL.set(span, generateRequestURL(requestURL, invocation));
Tags.COMPONENT.set(span, DUBBO_COMPONENT); Tags.COMPONENT.set(span, DUBBO_COMPONENT);
Tags.SPAN_LAYER.asRPCFramework(span); Tags.SPAN_LAYER.asRPCFramework(span);
Tags.PEER_HOST.set(span, requestURL.getHost()); span.setPeerHost(requestURL.getHost());
Tags.PEER_PORT.set(span, requestURL.getPort()); span.setPort(requestURL.getPort());
if (isConsumer) { if (isConsumer) {
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT);
......
...@@ -47,8 +47,8 @@ public class DefaultHttpClientInterceptor implements InstanceMethodsAroundInterc ...@@ -47,8 +47,8 @@ public class DefaultHttpClientInterceptor implements InstanceMethodsAroundInterc
URL url = new URL(request.url()); URL url = new URL(request.url());
Span span = ContextManager.createSpan(request.url()); Span span = ContextManager.createSpan(request.url());
Tags.PEER_PORT.set(span, url.getPort()); span.setPeerHost(url.getHost());
Tags.PEER_HOST.set(span, url.getHost()); span.setPort(url.getPort());
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT);
Tags.COMPONENT.set(span, COMPONENT_NAME); Tags.COMPONENT.set(span, COMPONENT_NAME);
Tags.HTTP.METHOD.set(span, request.method()); Tags.HTTP.METHOD.set(span, request.method());
......
...@@ -34,8 +34,8 @@ public class HttpClientExecuteInterceptor implements InstanceMethodsAroundInterc ...@@ -34,8 +34,8 @@ public class HttpClientExecuteInterceptor implements InstanceMethodsAroundInterc
HttpHost httpHost = (HttpHost) allArguments[0]; HttpHost httpHost = (HttpHost) allArguments[0];
HttpRequest httpRequest = (HttpRequest) allArguments[1]; HttpRequest httpRequest = (HttpRequest) allArguments[1];
Span span = createSpan(httpRequest); Span span = createSpan(httpRequest);
Tags.PEER_PORT.set(span, httpHost.getPort()); span.setPeerHost(httpHost.getHostName());
Tags.PEER_HOST.set(span, httpHost.getHostName()); span.setPort(httpHost.getPort());
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT);
Tags.COMPONENT.set(span, COMPONENT_NAME); Tags.COMPONENT.set(span, COMPONENT_NAME);
Tags.URL.set(span, generateURL(httpRequest)); Tags.URL.set(span, generateURL(httpRequest));
......
...@@ -11,7 +11,7 @@ import java.sql.SQLException; ...@@ -11,7 +11,7 @@ import java.sql.SQLException;
* {@link CallableStatementTracing} create span with the {@link Span#operationName} start with * {@link CallableStatementTracing} create span with the {@link Span#operationName} start with
* "JDBC/CallableStatement/"and set {@link ConnectionInfo#dbType} to the {@link Tags#COMPONENT}. * "JDBC/CallableStatement/"and set {@link ConnectionInfo#dbType} to the {@link Tags#COMPONENT}.
* <p> * <p>
* Notice: {@link Tags#PEERS} may be is null if database connection url don't contain multiple hosts. * Notice: {@link Span#peerHost} may be is null if database connection url don't contain multiple hosts.
* *
* @author zhangxin * @author zhangxin
*/ */
...@@ -29,10 +29,10 @@ public class CallableStatementTracing { ...@@ -29,10 +29,10 @@ public class CallableStatementTracing {
Tags.SPAN_LAYER.asDB(span); Tags.SPAN_LAYER.asDB(span);
Tags.COMPONENT.set(span, connectInfo.getDBType()); Tags.COMPONENT.set(span, connectInfo.getDBType());
if (!StringUtil.isEmpty(connectInfo.getHosts())) { if (!StringUtil.isEmpty(connectInfo.getHosts())) {
Tags.PEERS.set(span, connectInfo.getHosts()); span.setPeers(connectInfo.getHosts());
} else { } else {
Tags.PEER_PORT.set(span, connectInfo.getPort()); span.setPeerHost(connectInfo.getHost());
Tags.PEER_HOST.set(span, connectInfo.getHost()); span.setPort(connectInfo.getPort());
} }
return exec.exe(realStatement, sql); return exec.exe(realStatement, sql);
} catch (SQLException e) { } catch (SQLException e) {
......
...@@ -11,7 +11,7 @@ import java.sql.SQLException; ...@@ -11,7 +11,7 @@ import java.sql.SQLException;
* {@link ConnectionTracing} create span with the {@link Span#operationName} start with * {@link ConnectionTracing} create span with the {@link Span#operationName} start with
* "JDBC/Connection/"and set {@link ConnectionInfo#dbType} to the {@link Tags#COMPONENT}. * "JDBC/Connection/"and set {@link ConnectionInfo#dbType} to the {@link Tags#COMPONENT}.
* <p> * <p>
* Notice: {@link Tags#PEERS} may be is null if database connection url don't contain multiple hosts. * Notice: {@link Span#peerHost} may be is null if database connection url don't contain multiple hosts.
* *
* @author zhangxin * @author zhangxin
*/ */
...@@ -29,10 +29,10 @@ public class ConnectionTracing { ...@@ -29,10 +29,10 @@ public class ConnectionTracing {
Tags.COMPONENT.set(span, connectInfo.getDBType()); Tags.COMPONENT.set(span, connectInfo.getDBType());
Tags.SPAN_LAYER.asDB(span); Tags.SPAN_LAYER.asDB(span);
if (!StringUtil.isEmpty(connectInfo.getHosts())) { if (!StringUtil.isEmpty(connectInfo.getHosts())) {
Tags.PEERS.set(span, connectInfo.getHosts()); span.setPeers(connectInfo.getHosts());
} else { } else {
Tags.PEER_PORT.set(span, connectInfo.getPort()); span.setPeerHost(connectInfo.getHost());
Tags.PEER_HOST.set(span, connectInfo.getHost()); span.setPort(connectInfo.getPort());
} }
return exec.exe(realConnection, sql); return exec.exe(realConnection, sql);
} catch (SQLException e) { } catch (SQLException e) {
......
...@@ -11,7 +11,7 @@ import java.sql.SQLException; ...@@ -11,7 +11,7 @@ import java.sql.SQLException;
* {@link PreparedStatementTracing} create span with the {@link Span#operationName} start with * {@link PreparedStatementTracing} create span with the {@link Span#operationName} start with
* "JDBC/PreparedStatement/"and set {@link ConnectionInfo#dbType} to the {@link Tags#COMPONENT}. * "JDBC/PreparedStatement/"and set {@link ConnectionInfo#dbType} to the {@link Tags#COMPONENT}.
* <p> * <p>
* Notice: {@link Tags#PEERS} may be is null if database connection url don't contain multiple hosts. * Notice: {@link Span#peerHost} may be is null if database connection url don't contain multiple hosts.
* *
* @author zhangxin * @author zhangxin
*/ */
...@@ -28,10 +28,10 @@ public class PreparedStatementTracing { ...@@ -28,10 +28,10 @@ public class PreparedStatementTracing {
Tags.DB_STATEMENT.set(span, sql); Tags.DB_STATEMENT.set(span, sql);
Tags.COMPONENT.set(span, connectInfo.getDBType()); Tags.COMPONENT.set(span, connectInfo.getDBType());
if (!StringUtil.isEmpty(connectInfo.getHosts())) { if (!StringUtil.isEmpty(connectInfo.getHosts())) {
Tags.PEERS.set(span, connectInfo.getHosts()); span.setPeers(connectInfo.getHosts());
} else { } else {
Tags.PEER_PORT.set(span, connectInfo.getPort()); span.setPeerHost(connectInfo.getHost());
Tags.PEER_HOST.set(span, connectInfo.getHost()); span.setPort(connectInfo.getPort());
} }
Tags.SPAN_LAYER.asDB(span); Tags.SPAN_LAYER.asDB(span);
return exec.exe(realStatement, sql); return exec.exe(realStatement, sql);
......
...@@ -11,7 +11,7 @@ import java.sql.SQLException; ...@@ -11,7 +11,7 @@ import java.sql.SQLException;
* {@link StatementTracing} create span with the {@link Span#operationName} start with * {@link StatementTracing} create span with the {@link Span#operationName} start with
* "JDBC/Statement/"and set {@link ConnectionInfo#dbType} to the {@link Tags#COMPONENT}. * "JDBC/Statement/"and set {@link ConnectionInfo#dbType} to the {@link Tags#COMPONENT}.
* <p> * <p>
* Notice: {@link Tags#PEERS} may be is null if database connection url don't contain multiple hosts. * Notice: {@link Span#peerHost} may be is null if database connection url don't contain multiple hosts.
* *
* @author zhangxin * @author zhangxin
*/ */
...@@ -28,10 +28,10 @@ public class StatementTracing { ...@@ -28,10 +28,10 @@ public class StatementTracing {
Tags.COMPONENT.set(span, connectInfo.getDBType()); Tags.COMPONENT.set(span, connectInfo.getDBType());
Tags.SPAN_LAYER.asDB(span); Tags.SPAN_LAYER.asDB(span);
if (!StringUtil.isEmpty(connectInfo.getHosts())) { if (!StringUtil.isEmpty(connectInfo.getHosts())) {
Tags.PEERS.set(span, connectInfo.getHosts()); span.setPeers(connectInfo.getHosts());
} else { } else {
Tags.PEER_PORT.set(span, connectInfo.getPort()); span.setPeerHost(connectInfo.getHost());
Tags.PEER_HOST.set(span, connectInfo.getHost()); span.setPort(connectInfo.getPort());
} }
return exec.exe(realStatement, sql); return exec.exe(realStatement, sql);
} catch (SQLException e) { } catch (SQLException e) {
......
...@@ -53,10 +53,10 @@ public class JedisMethodInterceptor extends NoConcurrencyAccessObject implements ...@@ -53,10 +53,10 @@ public class JedisMethodInterceptor extends NoConcurrencyAccessObject implements
private void tagPeer(Span span, EnhancedClassInstanceContext context) { private void tagPeer(Span span, EnhancedClassInstanceContext context) {
String redisHosts = (String) context.get(KEY_OF_REDIS_HOSTS); String redisHosts = (String) context.get(KEY_OF_REDIS_HOSTS);
if (!StringUtil.isEmpty(redisHosts)) { if (!StringUtil.isEmpty(redisHosts)) {
Tags.PEERS.set(span, (String) context.get(KEY_OF_REDIS_HOSTS)); span.setPeerHost(context.get(KEY_OF_REDIS_HOST, String.class));
} else { } else {
Tags.PEER_HOST.set(span, (String) context.get(KEY_OF_REDIS_HOST)); span.setPeerHost(context.get(KEY_OF_REDIS_HOST, String.class));
Tags.PEER_PORT.set(span, (Integer) context.get(KEY_OF_REDIS_PORT)); span.setPort(context.get(KEY_OF_REDIS_PORT, Integer.class));
} }
} }
...@@ -82,10 +82,10 @@ public class JedisMethodInterceptor extends NoConcurrencyAccessObject implements ...@@ -82,10 +82,10 @@ public class JedisMethodInterceptor extends NoConcurrencyAccessObject implements
tagPeer(span, context); tagPeer(span, context);
Tags.SPAN_LAYER.asDB(span); Tags.SPAN_LAYER.asDB(span);
if (StringUtil.isEmpty(context.get(KEY_OF_REDIS_HOST, String.class))) { if (StringUtil.isEmpty(context.get(KEY_OF_REDIS_HOST, String.class))) {
Tags.PEERS.set(span, String.valueOf(context.get(KEY_OF_REDIS_HOSTS))); span.setPeerHost(context.get(KEY_OF_REDIS_HOST, String.class));
} else { } else {
Tags.PEER_HOST.set(span, context.get(KEY_OF_REDIS_HOST, String.class)); span.setPeerHost(context.get(KEY_OF_REDIS_HOST, String.class));
Tags.PEER_PORT.set(span, (Integer) context.get(KEY_OF_REDIS_PORT)); span.setPort(context.get(KEY_OF_REDIS_PORT, Integer.class));
} }
if (interceptorContext.allArguments().length > 0 if (interceptorContext.allArguments().length > 0
......
...@@ -67,8 +67,8 @@ public class MongoDBMethodInterceptor implements InstanceMethodsAroundIntercepto ...@@ -67,8 +67,8 @@ public class MongoDBMethodInterceptor implements InstanceMethodsAroundIntercepto
public Object afterMethod(EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext, public Object afterMethod(EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext,
Object ret) { Object ret) {
Span span = ContextManager.activeSpan(); Span span = ContextManager.activeSpan();
Tags.PEER_HOST.set(span, context.get(MONGODB_HOST, String.class)); span.setPeerHost(context.get(MONGODB_HOST, String.class));
Tags.PEER_PORT.set(span, (Integer) context.get(MONGODB_PORT)); span.setPort(context.get(MONGODB_PORT, Integer.class));
ContextManager.stopSpan(); ContextManager.stopSpan();
return ret; return ret;
} }
......
...@@ -49,8 +49,8 @@ public class MotanConsumerInterceptor implements InstanceConstructorInterceptor, ...@@ -49,8 +49,8 @@ public class MotanConsumerInterceptor implements InstanceConstructorInterceptor,
Request request = (Request) interceptorContext.allArguments()[0]; Request request = (Request) interceptorContext.allArguments()[0];
if (url != null) { if (url != null) {
Span span = ContextManager.createSpan(generateOperationName(url, request)); Span span = ContextManager.createSpan(generateOperationName(url, request));
Tags.PEER_HOST.set(span, url.getHost()); span.setPeerHost(url.getHost());
Tags.PEER_PORT.set(span, url.getPort()); span.setPort(url.getPort());
Tags.COMPONENT.set(span, MOTAN_COMPONENT); Tags.COMPONENT.set(span, MOTAN_COMPONENT);
Tags.URL.set(span, url.getIdentity()); Tags.URL.set(span, url.getIdentity());
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT);
......
...@@ -58,8 +58,8 @@ public class RealCallInterceptor implements InstanceMethodsAroundInterceptor, In ...@@ -58,8 +58,8 @@ public class RealCallInterceptor implements InstanceMethodsAroundInterceptor, In
Request request = (Request)context.get(REQUEST_CONTEXT_KEY); Request request = (Request)context.get(REQUEST_CONTEXT_KEY);
Span span = ContextManager.createSpan(request.url().uri().toString()); Span span = ContextManager.createSpan(request.url().uri().toString());
Tags.PEER_PORT.set(span, request.url().port()); span.setPeerHost(request.url().host());
Tags.PEER_HOST.set(span, request.url().host()); span.setPort(request.url().port());
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT);
Tags.COMPONENT.set(span, COMPONENT_NAME); Tags.COMPONENT.set(span, COMPONENT_NAME);
Tags.HTTP.METHOD.set(span, request.method()); Tags.HTTP.METHOD.set(span, request.method());
......
...@@ -37,8 +37,8 @@ public class ResinV3Interceptor implements InstanceMethodsAroundInterceptor { ...@@ -37,8 +37,8 @@ public class ResinV3Interceptor implements InstanceMethodsAroundInterceptor {
CauchoRequest request = (CauchoRequest)args[0]; CauchoRequest request = (CauchoRequest)args[0];
Span span = ContextManager.createSpan(request.getPageURI()); Span span = ContextManager.createSpan(request.getPageURI());
Tags.COMPONENT.set(span, RESIN_COMPONENT); Tags.COMPONENT.set(span, RESIN_COMPONENT);
Tags.PEER_HOST.set(span, request.getServerName()); span.setPeerHost(request.getServerName());
Tags.PEER_PORT.set(span, request.getServerPort()); span.setPort(request.getServerPort());
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER);
Tags.URL.set(span, appendRequestURL(request)); Tags.URL.set(span, appendRequestURL(request));
Tags.SPAN_LAYER.asHttp(span); Tags.SPAN_LAYER.asHttp(span);
......
...@@ -34,8 +34,8 @@ public class ResinV4Interceptor implements InstanceMethodsAroundInterceptor { ...@@ -34,8 +34,8 @@ public class ResinV4Interceptor implements InstanceMethodsAroundInterceptor {
CauchoRequest request = (CauchoRequest)args[0]; CauchoRequest request = (CauchoRequest)args[0];
Span span = ContextManager.createSpan(request.getPageURI()); Span span = ContextManager.createSpan(request.getPageURI());
Tags.COMPONENT.set(span, RESIN_COMPONENT); Tags.COMPONENT.set(span, RESIN_COMPONENT);
Tags.PEER_HOST.set(span, request.getServerName()); span.setPeerHost(request.getServerName());
Tags.PEER_PORT.set(span, request.getServerPort()); span.setPort(request.getServerPort());
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER);
Tags.URL.set(span, appendRequestURL(request)); Tags.URL.set(span, appendRequestURL(request));
Tags.SPAN_LAYER.asHttp(span); Tags.SPAN_LAYER.asHttp(span);
......
...@@ -45,8 +45,8 @@ public class TomcatInterceptor implements InstanceMethodsAroundInterceptor { ...@@ -45,8 +45,8 @@ public class TomcatInterceptor implements InstanceMethodsAroundInterceptor {
Span span = ContextManager.createSpan(request.getRequestURI()); Span span = ContextManager.createSpan(request.getRequestURI());
Tags.COMPONENT.set(span, TOMCAT_COMPONENT); Tags.COMPONENT.set(span, TOMCAT_COMPONENT);
Tags.PEER_HOST.set(span, fetchRequestPeerHost(request)); span.setPeerHost(fetchRequestPeerHost(request));
Tags.PEER_PORT.set(span, request.getRemotePort()); span.setPort(request.getRemotePort());
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER);
Tags.URL.set(span, request.getRequestURL().toString()); Tags.URL.set(span, request.getRequestURL().toString());
Tags.SPAN_LAYER.asHttp(span); Tags.SPAN_LAYER.asHttp(span);
......
...@@ -18,7 +18,7 @@ public class DubboSpanGenerator { ...@@ -18,7 +18,7 @@ public class DubboSpanGenerator {
Tags.COMPONENT.set(span, "Dubbo"); Tags.COMPONENT.set(span, "Dubbo");
Tags.URL.set(span, "rest://192.168.1.8:20880/default_rpc/org.skywalking.apm.test.persistence.PersistenceService.query(String)"); Tags.URL.set(span, "rest://192.168.1.8:20880/default_rpc/org.skywalking.apm.test.persistence.PersistenceService.query(String)");
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER);
span.setPeer_host("192.168.1.8"); span.setPeerHost("192.168.1.8");
span.setPort(20880); span.setPort(20880);
Tags.SPAN_LAYER.asHttp(span); Tags.SPAN_LAYER.asHttp(span);
} }
...@@ -36,7 +36,7 @@ public class DubboSpanGenerator { ...@@ -36,7 +36,7 @@ public class DubboSpanGenerator {
Tags.COMPONENT.set(span, "Dubbo"); Tags.COMPONENT.set(span, "Dubbo");
Tags.URL.set(span, "rest://192.168.1.8:20880/default_rpc/org.skywalking.apm.test.persistence.PersistenceService.query(String)"); Tags.URL.set(span, "rest://192.168.1.8:20880/default_rpc/org.skywalking.apm.test.persistence.PersistenceService.query(String)");
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT);
span.setPeer_host("10.21.9.35"); span.setPeerHost("10.21.9.35");
Tags.SPAN_LAYER.asHttp(span); Tags.SPAN_LAYER.asHttp(span);
} }
......
...@@ -16,7 +16,7 @@ public class MySQLGenerator { ...@@ -16,7 +16,7 @@ public class MySQLGenerator {
Span span = ContextManager.createSpan("mysql/jdbi/statement/executeQuery"); Span span = ContextManager.createSpan("mysql/jdbi/statement/executeQuery");
Tags.COMPONENT.set(span, "Mysql"); Tags.COMPONENT.set(span, "Mysql");
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT); Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_CLIENT);
span.setPeer_host("10.5.34.18"); span.setPeerHost("10.5.34.18");
span.setPort(30088); span.setPort(30088);
Tags.DB_INSTANCE.set(span, "mysql-instance"); Tags.DB_INSTANCE.set(span, "mysql-instance");
Tags.DB_STATEMENT.set(span, "select * from users where user_id = 1"); Tags.DB_STATEMENT.set(span, "select * from users where user_id = 1");
......
...@@ -19,7 +19,7 @@ public class TomcatSpanGenerator { ...@@ -19,7 +19,7 @@ public class TomcatSpanGenerator {
Tags.COMPONENT.set(webSpan, "Tomcat"); Tags.COMPONENT.set(webSpan, "Tomcat");
Tags.URL.set(webSpan, "http://10.21.9.35/web/serviceA"); Tags.URL.set(webSpan, "http://10.21.9.35/web/serviceA");
Tags.SPAN_KIND.set(webSpan, Tags.SPAN_KIND_SERVER); Tags.SPAN_KIND.set(webSpan, Tags.SPAN_KIND_SERVER);
webSpan.setPeer_host("10.21.9.35"); webSpan.setPeerHost("10.21.9.35");
webSpan.setPort(80); webSpan.setPort(80);
Tags.SPAN_LAYER.asHttp(webSpan); Tags.SPAN_LAYER.asHttp(webSpan);
} }
...@@ -41,7 +41,7 @@ public class TomcatSpanGenerator { ...@@ -41,7 +41,7 @@ public class TomcatSpanGenerator {
Tags.COMPONENT.set(webSpan, "Tomcat"); Tags.COMPONENT.set(webSpan, "Tomcat");
Tags.URL.set(webSpan, "http://10.21.9.35/web/unknown"); Tags.URL.set(webSpan, "http://10.21.9.35/web/unknown");
Tags.SPAN_KIND.set(webSpan, Tags.SPAN_KIND_SERVER); Tags.SPAN_KIND.set(webSpan, Tags.SPAN_KIND_SERVER);
webSpan.setPeer_host("10.21.9.35"); webSpan.setPeerHost("10.21.9.35");
webSpan.setPort(80); webSpan.setPort(80);
Tags.SPAN_LAYER.asHttp(webSpan); Tags.SPAN_LAYER.asHttp(webSpan);
} }
...@@ -64,7 +64,7 @@ public class TomcatSpanGenerator { ...@@ -64,7 +64,7 @@ public class TomcatSpanGenerator {
Tags.COMPONENT.set(webSpan, "Tomcat"); Tags.COMPONENT.set(webSpan, "Tomcat");
Tags.URL.set(webSpan, "http://10.21.9.35/web/error/service"); Tags.URL.set(webSpan, "http://10.21.9.35/web/error/service");
Tags.SPAN_KIND.set(webSpan, Tags.SPAN_KIND_SERVER); Tags.SPAN_KIND.set(webSpan, Tags.SPAN_KIND_SERVER);
webSpan.setPeer_host("10.21.9.35"); webSpan.setPeerHost("10.21.9.35");
webSpan.setPort(80); webSpan.setPort(80);
Tags.SPAN_LAYER.asHttp(webSpan); Tags.SPAN_LAYER.asHttp(webSpan);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册