Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿信在这里
SkyWalking
提交
ae9bc45c
S
SkyWalking
项目概览
阿信在这里
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / SkyWalking
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ae9bc45c
编写于
6月 09, 2017
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix compile issues.
上级
5ff9a698
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
54 addition
and
54 deletion
+54
-54
apm-commons/apm-trace/src/main/java/org/skywalking/apm/trace/Span.java
...pm-trace/src/main/java/org/skywalking/apm/trace/Span.java
+7
-7
apm-commons/apm-trace/src/test/java/org/skywalking/apm/trace/SpanTestCase.java
.../src/test/java/org/skywalking/apm/trace/SpanTestCase.java
+1
-1
apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/skywalking/apm/plugin/dubbo/DubboInterceptor.java
...ava/org/skywalking/apm/plugin/dubbo/DubboInterceptor.java
+2
-2
apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
...pm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
+2
-2
apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
...pm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
+2
-2
apm-sniffer/apm-sdk-plugin/jdbc-plugin/src/main/java/org/skywalking/apm/plugin/jdbc/CallableStatementTracing.java
.../skywalking/apm/plugin/jdbc/CallableStatementTracing.java
+4
-4
apm-sniffer/apm-sdk-plugin/jdbc-plugin/src/main/java/org/skywalking/apm/plugin/jdbc/ConnectionTracing.java
...ava/org/skywalking/apm/plugin/jdbc/ConnectionTracing.java
+4
-4
apm-sniffer/apm-sdk-plugin/jdbc-plugin/src/main/java/org/skywalking/apm/plugin/jdbc/PreparedStatementTracing.java
.../skywalking/apm/plugin/jdbc/PreparedStatementTracing.java
+4
-4
apm-sniffer/apm-sdk-plugin/jdbc-plugin/src/main/java/org/skywalking/apm/plugin/jdbc/StatementTracing.java
...java/org/skywalking/apm/plugin/jdbc/StatementTracing.java
+4
-4
apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/main/java/org/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
...kywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
+6
-6
apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/skywalking/apm/plugin/mongodb/v3/MongoDBMethodInterceptor.java
...lking/apm/plugin/mongodb/v3/MongoDBMethodInterceptor.java
+2
-2
apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/skywalking/apm/plugin/motan/MotanConsumerInterceptor.java
...skywalking/apm/plugin/motan/MotanConsumerInterceptor.java
+2
-2
apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/skywalking/apm/plugin/okhttp/v3/RealCallInterceptor.java
.../skywalking/apm/plugin/okhttp/v3/RealCallInterceptor.java
+2
-2
apm-sniffer/apm-sdk-plugin/resin-3.x-plugin/src/main/java/org/skywalking/apm/plugin/resin/v3/ResinV3Interceptor.java
...rg/skywalking/apm/plugin/resin/v3/ResinV3Interceptor.java
+2
-2
apm-sniffer/apm-sdk-plugin/resin-4.x-plugin/src/main/java/org/skywalking/apm/plugin/resin/v4/ResinV4Interceptor.java
...rg/skywalking/apm/plugin/resin/v4/ResinV4Interceptor.java
+2
-2
apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/skywalking/apm/plugin/tomcat78x/TomcatInterceptor.java
...rg/skywalking/apm/plugin/tomcat78x/TomcatInterceptor.java
+2
-2
apm-sniffer/apm-sniffer-mock/src/main/java/org/skywalking/apm/sniffer/mock/trace/builders/span/DubboSpanGenerator.java
.../sniffer/mock/trace/builders/span/DubboSpanGenerator.java
+2
-2
apm-sniffer/apm-sniffer-mock/src/main/java/org/skywalking/apm/sniffer/mock/trace/builders/span/MySQLGenerator.java
.../apm/sniffer/mock/trace/builders/span/MySQLGenerator.java
+1
-1
apm-sniffer/apm-sniffer-mock/src/main/java/org/skywalking/apm/sniffer/mock/trace/builders/span/TomcatSpanGenerator.java
...sniffer/mock/trace/builders/span/TomcatSpanGenerator.java
+3
-3
未找到文件。
apm-commons/apm-trace/src/main/java/org/skywalking/apm/trace/Span.java
浏览文件 @
ae9bc45c
...
@@ -53,10 +53,10 @@ public class Span {
...
@@ -53,10 +53,10 @@ public class Span {
private
String
operationName
;
private
String
operationName
;
/**
/**
* {@link #peer
_h
ost}, {@link #port} and {@link #peers} were part of tags,
* {@link #peer
H
ost}, {@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
_h
ost
;
private
String
peer
H
ost
;
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
_h
ost
;
return
peer
H
ost
;
}
}
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_h
ost
)
{
public
void
setPeer
Host
(
String
peerH
ost
)
{
this
.
peer
_host
=
peer_h
ost
;
this
.
peer
Host
=
peerH
ost
;
}
}
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
_h
ost
))
{
if
(!
StringUtil
.
isEmpty
(
span
.
peer
H
ost
))
{
tagWithStr
=
new
JsonObject
();
tagWithStr
=
new
JsonObject
();
tagWithStr
.
addProperty
(
"peer.host"
,
span
.
peer
_h
ost
);
tagWithStr
.
addProperty
(
"peer.host"
,
span
.
peer
H
ost
);
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
))
{
...
...
apm-commons/apm-trace/src/test/java/org/skywalking/apm/trace/SpanTestCase.java
浏览文件 @
ae9bc45c
...
@@ -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
_h
ost
(
"127.0.0.1"
);
span1
.
setPeer
H
ost
(
"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"
);
...
...
apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/skywalking/apm/plugin/dubbo/DubboInterceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
);
...
...
apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
.
getPor
t
());
span
.
setPeerHost
(
url
.
getHos
t
());
Tags
.
PEER_HOST
.
set
(
span
,
url
.
getHos
t
());
span
.
setPort
(
url
.
getPor
t
());
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
());
...
...
apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
));
...
...
apm-sniffer/apm-sdk-plugin/jdbc-plugin/src/main/java/org/skywalking/apm/plugin/jdbc/CallableStatementTracing.java
浏览文件 @
ae9bc45c
...
@@ -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
.
getPor
t
());
span
.
setPeerHost
(
connectInfo
.
getHos
t
());
Tags
.
PEER_HOST
.
set
(
span
,
connectInfo
.
getHos
t
());
span
.
setPort
(
connectInfo
.
getPor
t
());
}
}
return
exec
.
exe
(
realStatement
,
sql
);
return
exec
.
exe
(
realStatement
,
sql
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
...
...
apm-sniffer/apm-sdk-plugin/jdbc-plugin/src/main/java/org/skywalking/apm/plugin/jdbc/ConnectionTracing.java
浏览文件 @
ae9bc45c
...
@@ -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
.
getPor
t
());
span
.
setPeerHost
(
connectInfo
.
getHos
t
());
Tags
.
PEER_HOST
.
set
(
span
,
connectInfo
.
getHos
t
());
span
.
setPort
(
connectInfo
.
getPor
t
());
}
}
return
exec
.
exe
(
realConnection
,
sql
);
return
exec
.
exe
(
realConnection
,
sql
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
...
...
apm-sniffer/apm-sdk-plugin/jdbc-plugin/src/main/java/org/skywalking/apm/plugin/jdbc/PreparedStatementTracing.java
浏览文件 @
ae9bc45c
...
@@ -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
.
getPor
t
());
span
.
setPeerHost
(
connectInfo
.
getHos
t
());
Tags
.
PEER_HOST
.
set
(
span
,
connectInfo
.
getHos
t
());
span
.
setPort
(
connectInfo
.
getPor
t
());
}
}
Tags
.
SPAN_LAYER
.
asDB
(
span
);
Tags
.
SPAN_LAYER
.
asDB
(
span
);
return
exec
.
exe
(
realStatement
,
sql
);
return
exec
.
exe
(
realStatement
,
sql
);
...
...
apm-sniffer/apm-sdk-plugin/jdbc-plugin/src/main/java/org/skywalking/apm/plugin/jdbc/StatementTracing.java
浏览文件 @
ae9bc45c
...
@@ -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
.
getPor
t
());
span
.
setPeerHost
(
connectInfo
.
getHos
t
());
Tags
.
PEER_HOST
.
set
(
span
,
connectInfo
.
getHos
t
());
span
.
setPort
(
connectInfo
.
getPor
t
());
}
}
return
exec
.
exe
(
realStatement
,
sql
);
return
exec
.
exe
(
realStatement
,
sql
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
...
...
apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/main/java/org/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
...
...
apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/skywalking/apm/plugin/mongodb/v3/MongoDBMethodInterceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
;
}
}
...
...
apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/skywalking/apm/plugin/motan/MotanConsumerInterceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
);
...
...
apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/skywalking/apm/plugin/okhttp/v3/RealCallInterceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
().
por
t
());
span
.
setPeerHost
(
request
.
url
().
hos
t
());
Tags
.
PEER_HOST
.
set
(
span
,
request
.
url
().
hos
t
());
span
.
setPort
(
request
.
url
().
por
t
());
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
());
...
...
apm-sniffer/apm-sdk-plugin/resin-3.x-plugin/src/main/java/org/skywalking/apm/plugin/resin/v3/ResinV3Interceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
);
...
...
apm-sniffer/apm-sdk-plugin/resin-4.x-plugin/src/main/java/org/skywalking/apm/plugin/resin/v4/ResinV4Interceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
);
...
...
apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/skywalking/apm/plugin/tomcat78x/TomcatInterceptor.java
浏览文件 @
ae9bc45c
...
@@ -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
);
...
...
apm-sniffer/apm-sniffer-mock/src/main/java/org/skywalking/apm/sniffer/mock/trace/builders/span/DubboSpanGenerator.java
浏览文件 @
ae9bc45c
...
@@ -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
_h
ost
(
"192.168.1.8"
);
span
.
setPeer
H
ost
(
"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
_h
ost
(
"10.21.9.35"
);
span
.
setPeer
H
ost
(
"10.21.9.35"
);
Tags
.
SPAN_LAYER
.
asHttp
(
span
);
Tags
.
SPAN_LAYER
.
asHttp
(
span
);
}
}
...
...
apm-sniffer/apm-sniffer-mock/src/main/java/org/skywalking/apm/sniffer/mock/trace/builders/span/MySQLGenerator.java
浏览文件 @
ae9bc45c
...
@@ -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
_h
ost
(
"10.5.34.18"
);
span
.
setPeer
H
ost
(
"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"
);
...
...
apm-sniffer/apm-sniffer-mock/src/main/java/org/skywalking/apm/sniffer/mock/trace/builders/span/TomcatSpanGenerator.java
浏览文件 @
ae9bc45c
...
@@ -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
_h
ost
(
"10.21.9.35"
);
webSpan
.
setPeer
H
ost
(
"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
_h
ost
(
"10.21.9.35"
);
webSpan
.
setPeer
H
ost
(
"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
_h
ost
(
"10.21.9.35"
);
webSpan
.
setPeer
H
ost
(
"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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录