Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿信在这里
SkyWalking
提交
94dcf96e
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,发现更多精彩内容 >>
提交
94dcf96e
编写于
1月 25, 2018
作者:
L
lytscu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify catalog
上级
9ff20937
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
43 addition
and
14 deletion
+43
-14
apm-sniffer/apm-sdk-plugin/pom.xml
apm-sniffer/apm-sdk-plugin/pom.xml
+1
-1
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/pom.xml
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/pom.xml
+26
-0
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/pom.xml
...cecomb-plugin/servicecomb-java-chassis-0.x-plugin/pom.xml
+3
-3
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/InvocationInterceptor.java
...walking/apm/plugin/servicecomb/InvocationInterceptor.java
+5
-5
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/NextInterceptor.java
...he/skywalking/apm/plugin/servicecomb/NextInterceptor.java
+4
-1
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/define/InvocationInstrumentation.java
.../plugin/servicecomb/define/InvocationInstrumentation.java
+4
-4
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/resources/skywalking-plugin.def
...assis-0.x-plugin/src/main/resources/skywalking-plugin.def
+0
-0
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/servicecomb/InvocationInterceptorTest.java
...ing/apm/plugin/servicecomb/InvocationInterceptorTest.java
+0
-0
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/servicecomb/NextInterceptorTest.java
...kywalking/apm/plugin/servicecomb/NextInterceptorTest.java
+0
-0
未找到文件。
apm-sniffer/apm-sdk-plugin/pom.xml
浏览文件 @
94dcf96e
...
...
@@ -53,7 +53,7 @@
<module>
elastic-job-2.x-plugin
</module>
<module>
mongodb-2.x-plugin
</module>
<module>
httpasyncclient-4.x-plugin
</module>
<module>
servicecomb-
java-chassis-
plugin
</module>
<module>
servicecomb-plugin
</module>
</modules>
<packaging>
pom
</packaging>
...
...
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/pom.xml
0 → 100644
浏览文件 @
94dcf96e
<?xml version="1.0" encoding="UTF-8"?>
<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>
apm-sdk-plugin
</artifactId>
<groupId>
org.apache.skywalking
</groupId>
<version>
5.0.0-alpha
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
servicecomb-plugin
</artifactId>
<modules>
<module>
servicecomb-java-chassis-0.x-plugin
</module>
</modules>
<packaging>
pom
</packaging>
<name>
apm-sdk-plugin
</name>
<url>
http://maven.apache.org
</url>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<sdk.plugin.related.dir>
/..
</sdk.plugin.related.dir>
</properties>
</project>
\ No newline at end of file
apm-sniffer/apm-sdk-plugin/servicecomb-
java-chassis
-plugin/pom.xml
→
apm-sniffer/apm-sdk-plugin/servicecomb-
plugin/servicecomb-java-chassis-0.x
-plugin/pom.xml
浏览文件 @
94dcf96e
...
...
@@ -3,16 +3,16 @@
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>
apm-sdk
-plugin
</artifactId>
<artifactId>
servicecomb
-plugin
</artifactId>
<groupId>
org.apache.skywalking
</groupId>
<version>
5.0.0-alpha
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
apm-servicecomb-java-chassis-plugin
</artifactId>
<artifactId>
apm-servicecomb-java-chassis-
0.x-
plugin
</artifactId>
<packaging>
jar
</packaging>
<name>
servicecomb-java-chassis-plugin
</name>
<name>
servicecomb-java-chassis-
0.x-
plugin
</name>
<url>
http://maven.apache.org
</url>
...
...
apm-sniffer/apm-sdk-plugin/servicecomb-
java-chassis
-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/InvocationInterceptor.java
→
apm-sniffer/apm-sdk-plugin/servicecomb-
plugin/servicecomb-java-chassis-0.x
-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/InvocationInterceptor.java
浏览文件 @
94dcf96e
...
...
@@ -18,12 +18,12 @@
package
org.apache.skywalking.apm.plugin.servicecomb
;
import
java.lang.reflect.Method
;
import
javax.ws.rs.core.Response.StatusType
;
import
io.servicecomb.core.Invocation
;
import
io.servicecomb.swagger.invocation.InvocationType
;
import
io.servicecomb.swagger.invocation.InvocationType
;
import
io.servicecomb.swagger.invocation.SwaggerInvocation
;
import
io.servicecomb.swagger.invocation.context.InvocationContext
;
import
io.servicecomb.swagger.invocation.context.InvocationContext
;
import
java.lang.reflect.Method
;
import
javax.ws.rs.core.Response.StatusType
;
import
org.apache.skywalking.apm.agent.core.context.CarrierItem
;
import
org.apache.skywalking.apm.agent.core.context.ContextCarrier
;
import
org.apache.skywalking.apm.agent.core.context.ContextManager
;
...
...
@@ -36,7 +36,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInt
import
org.apache.skywalking.apm.network.trace.component.ComponentsDefine
;
/**
* {@link InvocationInterceptor} define how to enhance class {@link Invocation#getHandlerC
hain
()}.
* {@link InvocationInterceptor} define how to enhance class {@link Invocation#getHandlerC
ontext
()}.
*
* @author lytscu
*/
...
...
apm-sniffer/apm-sdk-plugin/servicecomb-
java-chassis
-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/NextInterceptor.java
→
apm-sniffer/apm-sdk-plugin/servicecomb-
plugin/servicecomb-java-chassis-0.x
-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/NextInterceptor.java
浏览文件 @
94dcf96e
...
...
@@ -23,6 +23,7 @@ import io.servicecomb.swagger.invocation.InvocationType;
import
io.servicecomb.swagger.invocation.SwaggerInvocation
;
import
io.servicecomb.swagger.invocation.context.InvocationContext
;
import
java.lang.reflect.Method
;
import
java.net.URI
;
import
javax.ws.rs.core.Response.StatusType
;
import
org.apache.skywalking.apm.agent.core.context.CarrierItem
;
import
org.apache.skywalking.apm.agent.core.context.ContextCarrier
;
...
...
@@ -60,8 +61,10 @@ public class NextInterceptor implements InstanceMethodsAroundInterceptor {
if
(
isConsumer
)
{
Integer
count
=
(
Integer
)
DEEP
.
get
();
try
{
//When count = 2, you can get the peer
if
(
count
==
2
)
{
String
peer
=
invocation
.
getEndpoint
().
getAddress
().
toString
();
URI
uri
=
new
URI
(
invocation
.
getEndpoint
().
toString
());
String
peer
=
uri
.
getHost
()
+
":"
+
uri
.
getPort
();
final
ContextCarrier
contextCarrier
=
new
ContextCarrier
();
span
=
ContextManager
.
createExitSpan
(
invocation
.
getOperationName
(),
contextCarrier
,
peer
);
CarrierItem
next
=
contextCarrier
.
items
();
...
...
apm-sniffer/apm-sdk-plugin/servicecomb-
java-chassis
-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/define/InvocationInstrumentation.java
→
apm-sniffer/apm-sdk-plugin/servicecomb-
plugin/servicecomb-java-chassis-0.x
-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/define/InvocationInstrumentation.java
浏览文件 @
94dcf96e
...
...
@@ -18,9 +18,9 @@
package
org.apache.skywalking.apm.plugin.servicecomb.define
;
import
io.servicecomb.core.Invocation
;
import
net.bytebuddy.description.method.MethodDescription
;
import
net.bytebuddy.matcher.ElementMatcher
;
import
io.servicecomb.core.Invocation
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine
;
...
...
@@ -31,8 +31,8 @@ import org.apache.skywalking.apm.plugin.servicecomb.InvocationInterceptor;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
named
;
/**
* {@link InvocationInstrumentation} presents that skywalking intercept {@link io.servicecomb.core.Invocation#
next(AsyncResponse)
}by
* using {@link InvocationInterceptor}, and {@link Invocation#
getHandlerChain()
by using {@link NextInterceptor},
* {@link InvocationInstrumentation} presents that skywalking intercept {@link io.servicecomb.core.Invocation#
getHandlerContext
}by
* using {@link InvocationInterceptor}, and {@link Invocation#
next
by using {@link NextInterceptor},
*
* @author lytscu
*/
...
...
@@ -60,7 +60,7 @@ public class InvocationInstrumentation extends ClassInstanceMethodsEnhancePlugin
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"getHandlerC
hain
"
);
return
named
(
"getHandlerC
ontext
"
);
}
@Override
...
...
apm-sniffer/apm-sdk-plugin/servicecomb-
java-chassis
-plugin/src/main/resources/skywalking-plugin.def
→
apm-sniffer/apm-sdk-plugin/servicecomb-
plugin/servicecomb-java-chassis-0.x
-plugin/src/main/resources/skywalking-plugin.def
浏览文件 @
94dcf96e
文件已移动
apm-sniffer/apm-sdk-plugin/servicecomb-
java-chassis
-plugin/src/test/java/org/apache/skywalking/apm/plugin/servicecomb/InvocationInterceptorTest.java
→
apm-sniffer/apm-sdk-plugin/servicecomb-
plugin/servicecomb-java-chassis-0.x
-plugin/src/test/java/org/apache/skywalking/apm/plugin/servicecomb/InvocationInterceptorTest.java
浏览文件 @
94dcf96e
文件已移动
apm-sniffer/apm-sdk-plugin/servicecomb-
java-chassis
-plugin/src/test/java/org/apache/skywalking/apm/plugin/servicecomb/NextInterceptorTest.java
→
apm-sniffer/apm-sdk-plugin/servicecomb-
plugin/servicecomb-java-chassis-0.x
-plugin/src/test/java/org/apache/skywalking/apm/plugin/servicecomb/NextInterceptorTest.java
浏览文件 @
94dcf96e
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录