Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
月轩居士
SkyWalking
提交
fe383773
S
SkyWalking
项目概览
月轩居士
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
4
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,发现更多精彩内容 >>
提交
fe383773
编写于
8月 11, 2017
作者:
A
ascrutae
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support spring mvc annotation plugin
上级
9f3434e8
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
235 addition
and
8 deletion
+235
-8
apm-network/src/main/java/org/skywalking/apm/network/trace/component/ComponentsDefine.java
...walking/apm/network/trace/component/ComponentsDefine.java
+6
-3
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/plugin/match/ClassAnnotationMatch.java
...ing/apm/agent/core/plugin/match/ClassAnnotationMatch.java
+2
-1
apm-sniffer/apm-agent/pom.xml
apm-sniffer/apm-agent/pom.xml
+5
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/concurrent/FailureCallbackInterceptor.java
.../plugin/spring/concurrent/FailureCallbackInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/concurrent/SuccessCallbackInterceptor.java
.../plugin/spring/concurrent/SuccessCallbackInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/pom.xml
...k-plugin/spring-plugins/mvc-annotation-4.x-plugin/pom.xml
+36
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerConstructorInterceptor.java
...m/plugin/spring/mvc/ControllerConstructorInterceptor.java
+22
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java
...plugin/spring/mvc/ControllerServiceMethodInterceptor.java
+61
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/define/AbstractControllerInstrumentation.java
.../spring/mvc/define/AbstractControllerInstrumentation.java
+76
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/define/ControllerInstrumentation.java
...m/plugin/spring/mvc/define/ControllerInstrumentation.java
+10
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/define/RestControllerInstrumentation.java
...ugin/spring/mvc/define/RestControllerInstrumentation.java
+10
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/resources/skywalking-plugin.def
...ation-4.x-plugin/src/main/resources/skywalking-plugin.def
+2
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/pom.xml
apm-sniffer/apm-sdk-plugin/spring-plugins/pom.xml
+1
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/resttemplate/async/RestExecuteInterceptor.java
...gin/spring/resttemplate/async/RestExecuteInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/resttemplate/sync/RestExecuteInterceptor.java
...ugin/spring/resttemplate/sync/RestExecuteInterceptor.java
+1
-1
未找到文件。
apm-network/src/main/java/org/skywalking/apm/network/trace/component/ComponentsDefine.java
浏览文件 @
fe383773
...
...
@@ -31,7 +31,9 @@ public class ComponentsDefine {
public
static
final
OfficialComponent
OKHTTP
=
new
OfficialComponent
(
12
,
"OKHttp"
);
public
static
final
OfficialComponent
REST_TEMPLATE
=
new
OfficialComponent
(
13
,
"RestTemplate"
);
public
static
final
OfficialComponent
SPRING_REST_TEMPLATE
=
new
OfficialComponent
(
13
,
"SpringRestTemplate"
);
public
static
final
OfficialComponent
SPRING_MVC_ANNOTATION
=
new
OfficialComponent
(
14
,
"SpringMVCAnnotation"
);
private
static
ComponentsDefine
instance
=
new
ComponentsDefine
();
...
...
@@ -42,7 +44,7 @@ public class ComponentsDefine {
}
public
ComponentsDefine
()
{
components
=
new
String
[
1
4
];
components
=
new
String
[
1
5
];
addComponent
(
TOMCAT
);
addComponent
(
HTTPCLIENT
);
addComponent
(
DUBBO
);
...
...
@@ -55,7 +57,8 @@ public class ComponentsDefine {
addComponent
(
RESIN
);
addComponent
(
FEIGN
);
addComponent
(
OKHTTP
);
addComponent
(
REST_TEMPLATE
);
addComponent
(
SPRING_REST_TEMPLATE
);
addComponent
(
SPRING_MVC_ANNOTATION
);
}
private
void
addComponent
(
OfficialComponent
component
)
{
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/plugin/match/ClassAnnotationMatch.java
浏览文件 @
fe383773
package
org.skywalking.apm.agent.core.plugin.match
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
net.bytebuddy.description.annotation.AnnotationDescription
;
...
...
@@ -43,7 +44,7 @@ public class ClassAnnotationMatch implements IndirectMatch {
@Override
public
boolean
isMatch
(
TypeDescription
typeDescription
)
{
List
<
String
>
annotationList
=
Arrays
.
asList
(
annotations
);
List
<
String
>
annotationList
=
new
ArrayList
<
String
>(
Arrays
.
asList
(
annotations
)
);
AnnotationList
declaredAnnotations
=
typeDescription
.
getDeclaredAnnotations
();
for
(
AnnotationDescription
annotation
:
declaredAnnotations
)
{
annotationList
.
remove
(
annotation
.
getAnnotationType
().
getActualName
());
...
...
apm-sniffer/apm-agent/pom.xml
浏览文件 @
fe383773
...
...
@@ -90,6 +90,11 @@
<artifactId>
apm-spring-concurrent-util-4.x-plugin
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.skywalking
</groupId>
<artifactId>
apm-springmvc-annotation-4.x-plugin
</artifactId>
<version>
${project.version}
</version>
</dependency>
<!-- activation -->
<dependency>
...
...
apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/concurrent/FailureCallbackInterceptor.java
浏览文件 @
fe383773
...
...
@@ -24,7 +24,7 @@ public class FailureCallbackInterceptor implements InstanceMethodsAroundIntercep
URI
uri
=
(
URI
)
cacheValues
[
0
];
AbstractSpan
span
=
ContextManager
.
createLocalSpan
(
"future/failureCallback:"
+
uri
.
getPath
());
span
.
errorOccurred
().
log
((
Throwable
)
allArguments
[
0
]).
setComponent
(
ComponentsDefine
.
REST_TEMPLATE
).
setLayer
(
SpanLayer
.
HTTP
);
span
.
errorOccurred
().
log
((
Throwable
)
allArguments
[
0
]).
setComponent
(
ComponentsDefine
.
SPRING_
REST_TEMPLATE
).
setLayer
(
SpanLayer
.
HTTP
);
Tags
.
URL
.
set
(
span
,
uri
.
getPath
());
ContextManager
.
continued
((
ContextSnapshot
)
cacheValues
[
2
]);
}
...
...
apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/concurrent/SuccessCallbackInterceptor.java
浏览文件 @
fe383773
...
...
@@ -24,7 +24,7 @@ public class SuccessCallbackInterceptor implements InstanceMethodsAroundIntercep
URI
uri
=
(
URI
)
cacheValues
[
0
];
AbstractSpan
span
=
ContextManager
.
createLocalSpan
(
"future/successCallback:"
+
uri
.
getPath
());
span
.
setComponent
(
ComponentsDefine
.
REST_TEMPLATE
).
setLayer
(
SpanLayer
.
HTTP
);
span
.
setComponent
(
ComponentsDefine
.
SPRING_
REST_TEMPLATE
).
setLayer
(
SpanLayer
.
HTTP
);
Tags
.
URL
.
set
(
span
,
uri
.
getPath
());
ContextManager
.
continued
((
ContextSnapshot
)
cacheValues
[
2
]);
}
...
...
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/pom.xml
0 → 100644
浏览文件 @
fe383773
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
spring-plugins
</artifactId>
<groupId>
org.skywalking
</groupId>
<version>
3.2-2017
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
apm-springmvc-annotation-4.x-plugin
</artifactId>
<packaging>
jar
</packaging>
<name>
mvc-annotation-4.x-plugin
</name>
<url>
http://maven.apache.org
</url>
<dependencies>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-core
</artifactId>
<version>
4.3.10.RELEASE
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-webmvc
</artifactId>
<version>
4.3.8.RELEASE
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<version>
4.0.0-b01
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</project>
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerConstructorInterceptor.java
0 → 100644
浏览文件 @
fe383773
package
org.skywalking.apm.plugin.spring.mvc
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
import
org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor
;
import
org.springframework.web.bind.annotation.RequestMapping
;
public
class
ControllerConstructorInterceptor
implements
InstanceConstructorInterceptor
{
@Override
public
void
onConstruct
(
EnhancedInstance
objInst
,
Object
[]
allArguments
)
{
String
basePath
=
""
;
RequestMapping
basePathRequestMapping
=
objInst
.
getClass
().
getAnnotation
(
RequestMapping
.
class
);
if
(
basePathRequestMapping
!=
null
)
{
basePath
=
basePathRequestMapping
.
value
()[
0
];
}
Map
<
Object
,
String
>
cacheRequestPath
=
new
HashMap
<
Object
,
String
>();
cacheRequestPath
.
put
(
"BASE_PATH"
,
basePath
);
objInst
.
setSkyWalkingDynamicField
(
cacheRequestPath
);
}
}
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java
0 → 100644
浏览文件 @
fe383773
package
org.skywalking.apm.plugin.spring.mvc
;
import
java.lang.reflect.Method
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.skywalking.apm.agent.core.conf.Config
;
import
org.skywalking.apm.agent.core.context.ContextCarrier
;
import
org.skywalking.apm.agent.core.context.ContextManager
;
import
org.skywalking.apm.agent.core.context.tag.Tags
;
import
org.skywalking.apm.agent.core.context.trace.AbstractSpan
;
import
org.skywalking.apm.agent.core.context.trace.SpanLayer
;
import
org.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
import
org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
;
import
org.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult
;
import
org.skywalking.apm.network.trace.component.ComponentsDefine
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
public
class
ControllerServiceMethodInterceptor
implements
InstanceMethodsAroundInterceptor
{
@Override
public
void
beforeMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
MethodInterceptResult
result
)
throws
Throwable
{
Map
<
Object
,
String
>
cacheRequestURL
=
(
Map
<
Object
,
String
>)
objInst
.
getSkyWalkingDynamicField
();
String
requestURL
=
cacheRequestURL
.
get
(
method
);
if
(
requestURL
==
null
)
{
requestURL
=
new
String
(
cacheRequestURL
.
get
(
"BASE_PATH"
));
requestURL
+=
method
.
getAnnotation
(
RequestMapping
.
class
).
value
()[
0
];
cacheRequestURL
.
put
(
method
,
requestURL
.
toString
());
}
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
tracingHeaderValue
=
request
.
getHeader
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
);
ContextCarrier
contextCarrier
=
new
ContextCarrier
().
deserialize
(
tracingHeaderValue
);
AbstractSpan
span
=
ContextManager
.
createEntrySpan
(
requestURL
,
contextCarrier
);
Tags
.
URL
.
set
(
span
,
request
.
getRequestURL
().
toString
());
Tags
.
HTTP
.
METHOD
.
set
(
span
,
request
.
getMethod
());
span
.
setComponent
(
ComponentsDefine
.
SPRING_MVC_ANNOTATION
);
SpanLayer
.
asHttp
(
span
);
}
@Override
public
Object
afterMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
Object
ret
)
throws
Throwable
{
HttpServletResponse
response
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getResponse
();
AbstractSpan
span
=
ContextManager
.
activeSpan
();
if
(
response
.
getStatus
()
>=
400
)
{
span
.
errorOccurred
();
Tags
.
STATUS_CODE
.
set
(
span
,
Integer
.
toString
(
response
.
getStatus
()));
}
ContextManager
.
stopSpan
();
return
ret
;
}
@Override
public
void
handleMethodException
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
Throwable
t
)
{
ContextManager
.
activeSpan
().
errorOccurred
().
log
(
t
);
}
}
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/define/AbstractControllerInstrumentation.java
0 → 100644
浏览文件 @
fe383773
package
org.skywalking.apm.plugin.spring.mvc.define
;
import
net.bytebuddy.description.method.MethodDescription
;
import
net.bytebuddy.matcher.ElementMatcher
;
import
org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint
;
import
org.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint
;
import
org.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine
;
import
org.skywalking.apm.agent.core.plugin.match.ClassMatch
;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
any
;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
isAnnotatedWith
;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
named
;
import
static
org
.
skywalking
.
apm
.
agent
.
core
.
plugin
.
match
.
ClassAnnotationMatch
.
byClassAnnotationMatch
;
/**
* {@link ControllerInstrumentation} enhance all constructor and method annotated with
* <code>org.springframework.web.bind.annotation.RequestMapping</code> that class has
* <code>org.springframework.stereotype.Controller</code> annotation.
*
* <code>org.skywalking.apm.plugin.spring.mvc.ControllerConstructorInterceptor</code> set the controller base path to
* dynamic field before execute constructor.
*
* <code>org.skywalking.apm.plugin.spring.mvc.ControllerServiceMethodInterceptor</code> get the request path from
* dynamic field first, if not found, <code>ControllerServiceMethodInterceptor</code> generate request path that
* combine the path value of current annotation on current method and the base path and set the new path to the dynamic
* filed
*
* @author zhangxin
*/
public
abstract
class
AbstractControllerInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
@Override
protected
ConstructorInterceptPoint
[]
getConstructorsInterceptPoints
()
{
return
new
ConstructorInterceptPoint
[]
{
new
ConstructorInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getConstructorMatcher
()
{
return
any
();
}
@Override
public
String
getConstructorInterceptor
()
{
return
"org.skywalking.apm.plugin.spring.mvc.ControllerConstructorInterceptor"
;
}
}
};
}
@Override
protected
InstanceMethodsInterceptPoint
[]
getInstanceMethodsInterceptPoints
()
{
return
new
InstanceMethodsInterceptPoint
[]
{
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
isAnnotatedWith
(
named
(
"org.springframework.web.bind.annotation.RequestMapping"
));
}
@Override
public
String
getMethodsInterceptor
()
{
return
"org.skywalking.apm.plugin.spring.mvc.ControllerServiceMethodInterceptor"
;
}
@Override
public
boolean
isOverrideArgs
()
{
return
false
;
}
}
};
}
@Override
protected
ClassMatch
enhanceClass
()
{
return
byClassAnnotationMatch
(
getEnhanceAnnotations
());
}
protected
abstract
String
[]
getEnhanceAnnotations
();
}
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/define/ControllerInstrumentation.java
0 → 100644
浏览文件 @
fe383773
package
org.skywalking.apm.plugin.spring.mvc.define
;
public
class
ControllerInstrumentation
extends
AbstractControllerInstrumentation
{
public
static
final
String
ENHANCE_ANNOTATION
=
"org.springframework.stereotype.Controller"
;
@Override
protected
String
[]
getEnhanceAnnotations
()
{
return
new
String
[]
{
ENHANCE_ANNOTATION
};
}
}
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/define/RestControllerInstrumentation.java
0 → 100644
浏览文件 @
fe383773
package
org.skywalking.apm.plugin.spring.mvc.define
;
public
class
RestControllerInstrumentation
extends
AbstractControllerInstrumentation
{
public
static
final
String
ENHANCE_ANNOTATION
=
"org.springframework.web.bind.annotation.RestController"
;
@Override
protected
String
[]
getEnhanceAnnotations
()
{
return
new
String
[]
{
ENHANCE_ANNOTATION
};
}
}
apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/resources/skywalking-plugin.def
0 → 100644
浏览文件 @
fe383773
spring-mvc-annotation-4.x=org.skywalking.apm.plugin.spring.mvc.define.ControllerInstrumentation
spring-mvc-annotation-4.x=org.skywalking.apm.plugin.spring.mvc.define.RestControllerInstrumentation
\ No newline at end of file
apm-sniffer/apm-sdk-plugin/spring-plugins/pom.xml
浏览文件 @
fe383773
...
...
@@ -13,6 +13,7 @@
<modules>
<module>
concurrent-util-4.x-plugin
</module>
<module>
resttemplate-4.x-plugin
</module>
<module>
mvc-annotation-4.x-plugin
</module>
</modules>
<packaging>
pom
</packaging>
...
...
apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/resttemplate/async/RestExecuteInterceptor.java
浏览文件 @
fe383773
...
...
@@ -24,7 +24,7 @@ public class RestExecuteInterceptor implements InstanceMethodsAroundInterceptor
String
remotePeer
=
requestURL
.
getHost
()
+
":"
+
requestURL
.
getPort
();
AbstractSpan
span
=
ContextManager
.
createExitSpan
(
requestURL
.
getPath
(),
contextCarrier
,
remotePeer
);
span
.
setComponent
(
ComponentsDefine
.
REST_TEMPLATE
);
span
.
setComponent
(
ComponentsDefine
.
SPRING_
REST_TEMPLATE
);
Tags
.
URL
.
set
(
span
,
requestURL
.
getScheme
()
+
"://"
+
requestURL
.
getHost
()
+
":"
+
requestURL
.
getPort
()
+
requestURL
.
getPath
());
Tags
.
HTTP
.
METHOD
.
set
(
span
,
httpMethod
.
toString
());
SpanLayer
.
asHttp
(
span
);
...
...
apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/resttemplate/sync/RestExecuteInterceptor.java
浏览文件 @
fe383773
...
...
@@ -24,7 +24,7 @@ public class RestExecuteInterceptor implements InstanceMethodsAroundInterceptor
String
remotePeer
=
requestURL
.
getHost
()
+
":"
+
requestURL
.
getPort
();
AbstractSpan
span
=
ContextManager
.
createExitSpan
(
requestURL
.
getPath
(),
contextCarrier
,
remotePeer
);
span
.
setComponent
(
ComponentsDefine
.
REST_TEMPLATE
);
span
.
setComponent
(
ComponentsDefine
.
SPRING_
REST_TEMPLATE
);
Tags
.
URL
.
set
(
span
,
requestURL
.
getScheme
()
+
"://"
+
requestURL
.
getHost
()
+
":"
+
requestURL
.
getPort
()
+
requestURL
.
getPath
());
Tags
.
HTTP
.
METHOD
.
set
(
span
,
httpMethod
.
toString
());
SpanLayer
.
asHttp
(
span
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录