Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
41399183
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
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,发现更多精彩内容 >>
未验证
提交
41399183
编写于
2月 28, 2018
作者:
G
Gao Hongtao
提交者:
GitHub
2月 28, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3 from hanahmily/master
Update from origin
上级
70393389
a393abc1
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
672 addition
and
17 deletion
+672
-17
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/table/register/ServerTypeDefine.java
...pm/collector/storage/table/register/ServerTypeDefine.java
+2
-1
apm-protocol/apm-network/src/main/java/org/apache/skywalking/apm/network/trace/component/ComponentsDefine.java
...walking/apm/network/trace/component/ComponentsDefine.java
+4
-1
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/pom.xml
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/pom.xml
+24
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/EnhanceRequireObjectCache.java
...king/apm/plugin/hystrix/v1/EnhanceRequireObjectCache.java
+48
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandConstructorInterceptor.java
...ugin/hystrix/v1/HystrixCommandConstructorInterceptor.java
+60
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandGetFallbackInterceptor.java
...ugin/hystrix/v1/HystrixCommandGetFallbackInterceptor.java
+53
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandRunInterceptor.java
...g/apm/plugin/hystrix/v1/HystrixCommandRunInterceptor.java
+57
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixPluginsInterceptor.java
...king/apm/plugin/hystrix/v1/HystrixPluginsInterceptor.java
+50
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/SWExecutionHookWrapper.java
...walking/apm/plugin/hystrix/v1/SWExecutionHookWrapper.java
+180
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/define/HystrixCommandInstrumentation.java
...ugin/hystrix/v1/define/HystrixCommandInstrumentation.java
+86
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/define/HystrixPluginsInstrumentation.java
...ugin/hystrix/v1/define/HystrixPluginsInstrumentation.java
+65
-0
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/resources/skywalking-plugin.def
...strix-1.x-plugin/src/main/resources/skywalking-plugin.def
+2
-0
apm-sniffer/apm-sdk-plugin/pom.xml
apm-sniffer/apm-sdk-plugin/pom.xml
+1
-0
apm-sniffer/apm-toolkit-activation/apm-toolkit-log4j-1.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/log4j/v1/x/TraceIdPatternConverterActivation.java
...ion/log/log4j/v1/x/TraceIdPatternConverterActivation.java
+8
-3
apm-sniffer/apm-toolkit-activation/apm-toolkit-log4j-2.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/log4j/v2/x/Log4j2OutputAppenderActivation.java
...vation/log/log4j/v2/x/Log4j2OutputAppenderActivation.java
+8
-3
apm-sniffer/apm-toolkit-activation/apm-toolkit-logback-1.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/logback/v1/x/LogbackPatternConverterActivation.java
...n/log/logback/v1/x/LogbackPatternConverterActivation.java
+8
-3
apm-sniffer/apm-toolkit-activation/apm-toolkit-logback-1.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/logback/v1/x/mdc/MDCConverterActivation.java
...tivation/log/logback/v1/x/mdc/MDCConverterActivation.java
+7
-3
apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TraceContextActivation.java
.../apm/toolkit/activation/trace/TraceContextActivation.java
+8
-3
docs/Supported-list.md
docs/Supported-list.md
+1
-0
未找到文件。
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/table/register/ServerTypeDefine.java
浏览文件 @
41399183
...
...
@@ -32,7 +32,7 @@ public class ServerTypeDefine {
private
ServerType
[]
serverTypes
;
private
ServerTypeDefine
()
{
this
.
serverTypes
=
new
ServerType
[
29
];
this
.
serverTypes
=
new
ServerType
[
30
];
this
.
serverTypeNames
=
new
String
[
11
];
addServerType
(
new
ServerType
(
ComponentsDefine
.
TOMCAT
.
getId
(),
Const
.
NONE
,
Const
.
EMPTY_STRING
));
addServerType
(
new
ServerType
(
ComponentsDefine
.
HTTPCLIENT
.
getId
(),
Const
.
NONE
,
Const
.
EMPTY_STRING
));
...
...
@@ -62,6 +62,7 @@ public class ServerTypeDefine {
addServerType
(
new
ServerType
(
ComponentsDefine
.
HTTP_ASYNC_CLIENT
.
getId
(),
Const
.
NONE
,
Const
.
EMPTY_STRING
));
addServerType
(
new
ServerType
(
ComponentsDefine
.
KAFKA
.
getId
(),
10
,
ComponentsDefine
.
KAFKA
.
getName
()));
addServerType
(
new
ServerType
(
ComponentsDefine
.
SERVICECOMB
.
getId
(),
Const
.
NONE
,
ComponentsDefine
.
SERVICECOMB
.
getName
()));
addServerType
(
new
ServerType
(
ComponentsDefine
.
HYSTRIX
.
getId
(),
Const
.
NONE
,
ComponentsDefine
.
HYSTRIX
.
getName
()));
}
public
static
ServerTypeDefine
getInstance
()
{
...
...
apm-protocol/apm-network/src/main/java/org/apache/skywalking/apm/network/trace/component/ComponentsDefine.java
浏览文件 @
41399183
...
...
@@ -82,6 +82,8 @@ public class ComponentsDefine {
public
static
final
OfficialComponent
SERVICECOMB
=
new
OfficialComponent
(
28
,
"ServiceComb"
);
public
static
final
OfficialComponent
HYSTRIX
=
new
OfficialComponent
(
29
,
"Hystrix"
);
private
static
ComponentsDefine
INSTANCE
=
new
ComponentsDefine
();
private
String
[]
components
;
...
...
@@ -91,7 +93,7 @@ public class ComponentsDefine {
}
public
ComponentsDefine
()
{
components
=
new
String
[
29
];
components
=
new
String
[
30
];
addComponent
(
TOMCAT
);
addComponent
(
HTTPCLIENT
);
addComponent
(
DUBBO
);
...
...
@@ -120,6 +122,7 @@ public class ComponentsDefine {
addComponent
(
HTTP_ASYNC_CLIENT
);
addComponent
(
KAFKA
);
addComponent
(
SERVICECOMB
);
addComponent
(
HYSTRIX
);
}
private
void
addComponent
(
OfficialComponent
component
)
{
...
...
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/pom.xml
0 → 100644
浏览文件 @
41399183
<?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-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
apm-hystrix-1.x-plugin
</artifactId>
<dependencies>
<dependency>
<groupId>
com.netflix.hystrix
</groupId>
<artifactId>
hystrix-core
</artifactId>
<version>
1.4.0
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</project>
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/EnhanceRequireObjectCache.java
0 → 100644
浏览文件 @
41399183
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.hystrix.v1
;
import
org.apache.skywalking.apm.agent.core.context.ContextSnapshot
;
/**
* {@link EnhanceRequireObjectCache} record the prefix operation name of span and {@link ContextSnapshot} object for
* tracing.
*
* @author zhang xin
*/
public
class
EnhanceRequireObjectCache
{
private
final
String
operationNamePrefix
;
private
ContextSnapshot
contextSnapshot
;
public
EnhanceRequireObjectCache
(
String
prefix
)
{
operationNamePrefix
=
prefix
;
}
public
String
getOperationNamePrefix
()
{
return
operationNamePrefix
;
}
public
ContextSnapshot
getContextSnapshot
()
{
return
contextSnapshot
;
}
public
void
setContextSnapshot
(
ContextSnapshot
contextSnapshot
)
{
this
.
contextSnapshot
=
contextSnapshot
;
}
}
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandConstructorInterceptor.java
0 → 100644
浏览文件 @
41399183
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.hystrix.v1
;
import
com.netflix.hystrix.HystrixCollapser
;
import
com.netflix.hystrix.HystrixCommand
;
import
com.netflix.hystrix.HystrixObservableCollapser
;
import
com.netflix.hystrix.HystrixObservableCommand
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor
;
/**
* {@link HystrixCommandConstructorInterceptor} get <code>CommandKey</code> or <code>CollapserKey</code> as the
* operation name prefix of span when the constructor that the class hierarchy <code>com.netflix.hystrix.HystrixCommand</code>
* invoked.
*
* @author zhang xin
*/
public
class
HystrixCommandConstructorInterceptor
implements
InstanceConstructorInterceptor
{
public
static
final
String
OPERATION_NAME_PREFIX
=
"Hystrix/"
;
@Override
public
void
onConstruct
(
EnhancedInstance
objInst
,
Object
[]
allArguments
)
{
String
commandIdentify
=
""
;
if
(
HystrixCommand
.
class
.
isAssignableFrom
(
objInst
.
getClass
()))
{
HystrixCommand
hystrixCommand
=
(
HystrixCommand
)
objInst
;
commandIdentify
=
hystrixCommand
.
getCommandKey
().
name
();
}
else
if
(
HystrixCollapser
.
class
.
isAssignableFrom
(
objInst
.
getClass
()))
{
HystrixCollapser
hystrixCollapser
=
(
HystrixCollapser
)
objInst
;
commandIdentify
=
hystrixCollapser
.
getCollapserKey
().
name
();
}
else
if
(
HystrixObservableCollapser
.
class
.
isAssignableFrom
(
objInst
.
getClass
()))
{
HystrixObservableCollapser
hystrixObservableCollapser
=
(
HystrixObservableCollapser
)
objInst
;
commandIdentify
=
hystrixObservableCollapser
.
getCollapserKey
().
name
();
}
else
if
(
HystrixObservableCommand
.
class
.
isAssignableFrom
(
objInst
.
getClass
()))
{
HystrixObservableCommand
hystrixObservableCommand
=
(
HystrixObservableCommand
)
objInst
;
commandIdentify
=
hystrixObservableCommand
.
getCommandKey
().
name
();
}
objInst
.
setSkyWalkingDynamicField
(
new
EnhanceRequireObjectCache
(
OPERATION_NAME_PREFIX
+
commandIdentify
));
}
}
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandGetFallbackInterceptor.java
0 → 100644
浏览文件 @
41399183
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.hystrix.v1
;
import
java.lang.reflect.Method
;
import
org.apache.skywalking.apm.agent.core.context.ContextManager
;
import
org.apache.skywalking.apm.agent.core.context.ContextSnapshot
;
import
org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult
;
import
org.apache.skywalking.apm.network.trace.component.ComponentsDefine
;
public
class
HystrixCommandGetFallbackInterceptor
implements
InstanceMethodsAroundInterceptor
{
@Override
public
void
beforeMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
MethodInterceptResult
result
)
throws
Throwable
{
EnhanceRequireObjectCache
enhanceRequireObjectCache
=
(
EnhanceRequireObjectCache
)
objInst
.
getSkyWalkingDynamicField
();
ContextSnapshot
snapshot
=
enhanceRequireObjectCache
.
getContextSnapshot
();
AbstractSpan
activeSpan
=
ContextManager
.
createLocalSpan
(
enhanceRequireObjectCache
.
getOperationNamePrefix
()
+
"/Fallback"
);
activeSpan
.
setComponent
(
ComponentsDefine
.
HYSTRIX
);
ContextManager
.
continued
(
snapshot
);
}
@Override
public
Object
afterMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
Object
ret
)
throws
Throwable
{
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/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandRunInterceptor.java
0 → 100644
浏览文件 @
41399183
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.hystrix.v1
;
import
java.lang.reflect.Method
;
import
org.apache.skywalking.apm.agent.core.context.ContextManager
;
import
org.apache.skywalking.apm.agent.core.context.ContextSnapshot
;
import
org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult
;
import
org.apache.skywalking.apm.network.trace.component.ComponentsDefine
;
public
class
HystrixCommandRunInterceptor
implements
InstanceMethodsAroundInterceptor
{
@Override
public
void
beforeMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
MethodInterceptResult
result
)
throws
Throwable
{
// create a local span, and continued, The `execution method` running in other thread if the
// hystrix strategy is `THREAD`.
EnhanceRequireObjectCache
enhanceRequireObjectCache
=
(
EnhanceRequireObjectCache
)
objInst
.
getSkyWalkingDynamicField
();
ContextSnapshot
snapshot
=
enhanceRequireObjectCache
.
getContextSnapshot
();
AbstractSpan
activeSpan
=
ContextManager
.
createLocalSpan
(
enhanceRequireObjectCache
.
getOperationNamePrefix
()
+
"/Execution"
);
activeSpan
.
setComponent
(
ComponentsDefine
.
HYSTRIX
);
ContextManager
.
continued
(
snapshot
);
// Because of `fall back` method running in other thread. so we need capture concurrent span for tracing.
enhanceRequireObjectCache
.
setContextSnapshot
(
ContextManager
.
capture
());
}
@Override
public
Object
afterMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
Object
ret
)
throws
Throwable
{
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/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixPluginsInterceptor.java
0 → 100644
浏览文件 @
41399183
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.hystrix.v1
;
import
com.netflix.hystrix.strategy.HystrixPlugins
;
import
com.netflix.hystrix.strategy.executionhook.HystrixCommandExecutionHook
;
import
java.lang.reflect.Method
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult
;
/**
* {@link HystrixPluginsInterceptor} wrapper the {@link HystrixCommandExecutionHook} object by using {@link
* SWExecutionHookWrapper} when the {@link HystrixPlugins#getCommandExecutionHook()} method invoked.
*
* @author zhang xin
*/
public
class
HystrixPluginsInterceptor
implements
InstanceMethodsAroundInterceptor
{
@Override
public
void
beforeMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
MethodInterceptResult
result
)
throws
Throwable
{
}
@Override
public
Object
afterMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
Object
ret
)
throws
Throwable
{
return
new
SWExecutionHookWrapper
((
HystrixCommandExecutionHook
)
ret
);
}
@Override
public
void
handleMethodException
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
Throwable
t
)
{
}
}
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/SWExecutionHookWrapper.java
0 → 100644
浏览文件 @
41399183
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.hystrix.v1
;
import
com.netflix.hystrix.HystrixCommand
;
import
com.netflix.hystrix.HystrixInvokable
;
import
com.netflix.hystrix.exception.HystrixRuntimeException
;
import
com.netflix.hystrix.strategy.executionhook.HystrixCommandExecutionHook
;
import
org.apache.skywalking.apm.agent.core.context.ContextManager
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
/**
* {@link SWExecutionHookWrapper} wrapper the HystrixCommandExecutionHook object for tracing.
*
* @author zhang xin
*/
public
class
SWExecutionHookWrapper
extends
HystrixCommandExecutionHook
{
private
final
HystrixCommandExecutionHook
actual
;
public
SWExecutionHookWrapper
(
HystrixCommandExecutionHook
actual
)
{
this
.
actual
=
actual
;
}
@Override
public
<
T
>
void
onStart
(
HystrixInvokable
<
T
>
commandInstance
)
{
EnhancedInstance
enhancedInstance
=
(
EnhancedInstance
)
commandInstance
;
EnhanceRequireObjectCache
enhanceRequireObjectCache
=
(
EnhanceRequireObjectCache
)
enhancedInstance
.
getSkyWalkingDynamicField
();
enhanceRequireObjectCache
.
setContextSnapshot
(
ContextManager
.
capture
());
actual
.
onStart
(
commandInstance
);
}
@Override
public
<
T
>
void
onExecutionStart
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onExecutionStart
(
commandInstance
);
}
@Override
public
<
T
>
Exception
onExecutionError
(
HystrixInvokable
<
T
>
commandInstance
,
Exception
e
)
{
return
actual
.
onExecutionError
(
commandInstance
,
e
);
}
@Override
public
<
T
>
void
onExecutionSuccess
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onExecutionSuccess
(
commandInstance
);
}
@Override
public
<
T
>
void
onFallbackStart
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onFallbackStart
(
commandInstance
);
}
@Override
public
<
T
>
Exception
onFallbackError
(
HystrixInvokable
<
T
>
commandInstance
,
Exception
e
)
{
return
actual
.
onFallbackError
(
commandInstance
,
e
);
}
@Override
public
<
T
>
void
onFallbackSuccess
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onFallbackSuccess
(
commandInstance
);
}
@Override
public
<
T
>
Exception
onRunError
(
HystrixInvokable
<
T
>
commandInstance
,
Exception
e
)
{
return
actual
.
onRunError
(
commandInstance
,
e
);
}
@Override
public
<
T
>
Exception
onRunError
(
HystrixCommand
<
T
>
commandInstance
,
Exception
e
)
{
return
actual
.
onRunError
(
commandInstance
,
e
);
}
@Override
public
<
T
>
Exception
onError
(
HystrixInvokable
<
T
>
commandInstance
,
HystrixRuntimeException
.
FailureType
failureType
,
Exception
e
)
{
return
actual
.
onError
(
commandInstance
,
failureType
,
e
);
}
@Override
public
<
T
>
void
onSuccess
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onSuccess
(
commandInstance
);
}
@Override
public
<
T
>
T
onEmit
(
HystrixInvokable
<
T
>
commandInstance
,
T
value
)
{
return
actual
.
onEmit
(
commandInstance
,
value
);
}
@Override
public
<
T
>
T
onExecutionEmit
(
HystrixInvokable
<
T
>
commandInstance
,
T
value
)
{
return
actual
.
onExecutionEmit
(
commandInstance
,
value
);
}
@Override
public
<
T
>
T
onFallbackEmit
(
HystrixInvokable
<
T
>
commandInstance
,
T
value
)
{
return
actual
.
onFallbackEmit
(
commandInstance
,
value
);
}
@Override
public
<
T
>
void
onCacheHit
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onCacheHit
(
commandInstance
);
}
@Override
public
<
T
>
void
onThreadComplete
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onThreadComplete
(
commandInstance
);
}
@Override
public
<
T
>
void
onThreadStart
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onThreadStart
(
commandInstance
);
}
@Override
public
<
T
>
Exception
onError
(
HystrixCommand
<
T
>
commandInstance
,
HystrixRuntimeException
.
FailureType
failureType
,
Exception
e
)
{
return
actual
.
onError
(
commandInstance
,
failureType
,
e
);
}
@Override
public
<
T
>
Exception
onFallbackError
(
HystrixCommand
<
T
>
commandInstance
,
Exception
e
)
{
return
actual
.
onFallbackError
(
commandInstance
,
e
);
}
@Override
public
<
T
>
T
onComplete
(
HystrixCommand
<
T
>
commandInstance
,
T
response
)
{
return
actual
.
onComplete
(
commandInstance
,
response
);
}
@Override
public
<
T
>
T
onComplete
(
HystrixInvokable
<
T
>
commandInstance
,
T
response
)
{
return
actual
.
onComplete
(
commandInstance
,
response
);
}
@Override
public
<
T
>
T
onFallbackSuccess
(
HystrixCommand
<
T
>
commandInstance
,
T
fallbackResponse
)
{
return
actual
.
onFallbackSuccess
(
commandInstance
,
fallbackResponse
);
}
@Override
public
<
T
>
T
onFallbackSuccess
(
HystrixInvokable
<
T
>
commandInstance
,
T
fallbackResponse
)
{
return
actual
.
onFallbackSuccess
(
commandInstance
,
fallbackResponse
);
}
@Override
public
<
T
>
T
onRunSuccess
(
HystrixCommand
<
T
>
commandInstance
,
T
response
)
{
return
actual
.
onRunSuccess
(
commandInstance
,
response
);
}
@Override
public
<
T
>
T
onRunSuccess
(
HystrixInvokable
<
T
>
commandInstance
,
T
response
)
{
return
actual
.
onRunSuccess
(
commandInstance
,
response
);
}
@Override
public
<
T
>
void
onFallbackStart
(
HystrixCommand
<
T
>
commandInstance
)
{
actual
.
onFallbackStart
(
commandInstance
);
}
@Override
public
<
T
>
void
onRunStart
(
HystrixCommand
<
T
>
commandInstance
)
{
actual
.
onRunStart
(
commandInstance
);
}
@Override
public
<
T
>
void
onRunStart
(
HystrixInvokable
<
T
>
commandInstance
)
{
actual
.
onRunStart
(
commandInstance
);
}
@Override
public
<
T
>
void
onStart
(
HystrixCommand
<
T
>
commandInstance
)
{
EnhancedInstance
enhancedInstance
=
(
EnhancedInstance
)
commandInstance
;
EnhanceRequireObjectCache
enhanceRequireObjectCache
=
(
EnhanceRequireObjectCache
)
enhancedInstance
.
getSkyWalkingDynamicField
();
enhanceRequireObjectCache
.
setContextSnapshot
(
ContextManager
.
capture
());
actual
.
onStart
(
commandInstance
);
}
@Override
public
<
T
>
void
onThreadComplete
(
HystrixCommand
<
T
>
commandInstance
)
{
actual
.
onThreadComplete
(
commandInstance
);
}
@Override
public
<
T
>
void
onThreadStart
(
HystrixCommand
<
T
>
commandInstance
)
{
actual
.
onThreadStart
(
commandInstance
);
}
}
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/define/HystrixCommandInstrumentation.java
0 → 100644
浏览文件 @
41399183
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.hystrix.v1.define
;
import
net.bytebuddy.description.method.MethodDescription
;
import
net.bytebuddy.matcher.ElementMatcher
;
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
;
import
org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch
;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
any
;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
named
;
import
static
org
.
apache
.
skywalking
.
apm
.
agent
.
core
.
plugin
.
match
.
HierarchyMatch
.
byHierarchyMatch
;
public
class
HystrixCommandInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
public
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.plugin.hystrix.v1.HystrixCommandConstructorInterceptor"
;
public
static
final
String
ENHANCE_CLASS
=
"com.netflix.hystrix.HystrixCommand"
;
@Override
protected
ConstructorInterceptPoint
[]
getConstructorsInterceptPoints
()
{
return
new
ConstructorInterceptPoint
[]
{
new
ConstructorInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getConstructorMatcher
()
{
return
any
();
}
@Override
public
String
getConstructorInterceptor
()
{
return
INTERCEPT_CLASS
;
}
}
};
}
@Override
protected
InstanceMethodsInterceptPoint
[]
getInstanceMethodsInterceptPoints
()
{
return
new
InstanceMethodsInterceptPoint
[]
{
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"run"
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
"org.apache.skywalking.apm.plugin.hystrix.v1.HystrixCommandRunInterceptor"
;
}
@Override
public
boolean
isOverrideArgs
()
{
return
false
;
}
},
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"getFallback"
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
"org.apache.skywalking.apm.plugin.hystrix.v1.HystrixCommandGetFallbackInterceptor"
;
}
@Override
public
boolean
isOverrideArgs
()
{
return
false
;
}
}
};
}
@Override
protected
ClassMatch
enhanceClass
()
{
return
byHierarchyMatch
(
new
String
[]
{
ENHANCE_CLASS
});
}
}
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/define/HystrixPluginsInstrumentation.java
0 → 100644
浏览文件 @
41399183
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.hystrix.v1.define
;
import
net.bytebuddy.description.method.MethodDescription
;
import
net.bytebuddy.matcher.ElementMatcher
;
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
;
import
org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch
;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
named
;
import
static
org
.
apache
.
skywalking
.
apm
.
agent
.
core
.
plugin
.
match
.
NameMatch
.
byName
;
public
class
HystrixPluginsInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
public
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.plugin.hystrix.v1.HystrixPluginsInterceptor"
;
public
static
final
String
ENHANCE_METHOD
=
"getCommandExecutionHook"
;
public
static
final
String
ENHANCE_CLASS
=
"com.netflix.hystrix.strategy.HystrixPlugins"
;
@Override
protected
ConstructorInterceptPoint
[]
getConstructorsInterceptPoints
()
{
return
new
ConstructorInterceptPoint
[
0
];
}
@Override
protected
InstanceMethodsInterceptPoint
[]
getInstanceMethodsInterceptPoints
()
{
return
new
InstanceMethodsInterceptPoint
[]
{
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
ENHANCE_METHOD
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
INTERCEPT_CLASS
;
}
@Override
public
boolean
isOverrideArgs
()
{
return
false
;
}
}
};
}
@Override
protected
ClassMatch
enhanceClass
()
{
return
byName
(
ENHANCE_CLASS
);
}
}
apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/resources/skywalking-plugin.def
0 → 100644
浏览文件 @
41399183
hystrix-1.x=org.apache.skywalking.apm.plugin.hystrix.v1.define.HystrixCommandInstrumentation
hystrix-1.x=org.apache.skywalking.apm.plugin.hystrix.v1.define.HystrixPluginsInstrumentation
apm-sniffer/apm-sdk-plugin/pom.xml
浏览文件 @
41399183
...
...
@@ -55,6 +55,7 @@
<module>
httpasyncclient-4.x-plugin
</module>
<module>
kafka-v1-plugin
</module>
<module>
servicecomb-plugin
</module>
<module>
hystrix-1.x-plugin
</module>
</modules>
<packaging>
pom
</packaging>
...
...
apm-sniffer/apm-toolkit-activation/apm-toolkit-log4j-1.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/log4j/v1/x/TraceIdPatternConverterActivation.java
浏览文件 @
41399183
...
...
@@ -38,12 +38,17 @@ import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName
* @author wusheng
*/
public
class
TraceIdPatternConverterActivation
extends
ClassInstanceMethodsEnhancePluginDefine
{
public
static
final
String
ENHANCE_CLASS
=
"org.apache.skywalking.apm.toolkit.log.log4j.v1.x.TraceIdPatternConverter"
;
public
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.toolkit.activation.log.log4j.v1.x.PrintTraceIdInterceptor"
;
public
static
final
String
ENHANCE_METHOD
=
"convert"
;
/**
* @return the target class, which needs active.
*/
@Override
protected
ClassMatch
enhanceClass
()
{
return
byName
(
"TraceIdPatternConverter"
);
return
byName
(
ENHANCE_CLASS
);
}
/**
...
...
@@ -64,12 +69,12 @@ public class TraceIdPatternConverterActivation extends ClassInstanceMethodsEnhan
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"convert"
);
return
named
(
ENHANCE_METHOD
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
"PrintTraceIdInterceptor"
;
return
INTERCEPT_CLASS
;
}
@Override
public
boolean
isOverrideArgs
()
{
...
...
apm-sniffer/apm-toolkit-activation/apm-toolkit-log4j-2.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/log4j/v2/x/Log4j2OutputAppenderActivation.java
浏览文件 @
41399183
...
...
@@ -37,12 +37,17 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
* @author wusheng
*/
public
class
Log4j2OutputAppenderActivation
extends
ClassStaticMethodsEnhancePluginDefine
{
public
static
final
String
ENHANCE_CLASS
=
"org.apache.skywalking.apm.toolkit.log.log4j.v2.x.Log4j2OutputAppender"
;
public
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.toolkit.activation.log.log4j.v2.x.PrintTraceIdInterceptor"
;
public
static
final
String
ENHANCE_METHOD
=
"append"
;
/**
* @return the target class, which needs active.
*/
@Override
protected
ClassMatch
enhanceClass
()
{
return
NameMatch
.
byName
(
"org.apache.skywalking.apm.toolkit.log.log4j.v2.x.Log4j2OutputAppender"
);
return
NameMatch
.
byName
(
ENHANCE_CLASS
);
}
/**
...
...
@@ -55,12 +60,12 @@ public class Log4j2OutputAppenderActivation extends ClassStaticMethodsEnhancePlu
new
StaticMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"append"
);
return
named
(
ENHANCE_METHOD
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
"PrintTraceIdInterceptor"
;
return
INTERCEPT_CLASS
;
}
@Override
public
boolean
isOverrideArgs
()
{
...
...
apm-sniffer/apm-toolkit-activation/apm-toolkit-logback-1.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/logback/v1/x/LogbackPatternConverterActivation.java
浏览文件 @
41399183
...
...
@@ -39,12 +39,17 @@ import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName
* Created by wusheng on 2016/12/7.
*/
public
class
LogbackPatternConverterActivation
extends
ClassInstanceMethodsEnhancePluginDefine
{
public
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.toolkit.activation.log.logback.v1.x.PrintTraceIdInterceptor"
;
public
static
final
String
ENHANCE_CLASS
=
"org.apache.skywalking.apm.toolkit.log.logback.v1.x.LogbackPatternConverter"
;
public
static
final
String
ENHANCE_METHOD
=
"convert"
;
/**
* @return the target class, which needs active.
*/
@Override
protected
ClassMatch
enhanceClass
()
{
return
byName
(
"org.apache.skywalking.apm.toolkit.log.logback.v1.x.LogbackPatternConverter"
);
return
byName
(
ENHANCE_CLASS
);
}
/**
...
...
@@ -65,12 +70,12 @@ public class LogbackPatternConverterActivation extends ClassInstanceMethodsEnhan
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"convert"
);
return
named
(
ENHANCE_METHOD
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
"PrintTraceIdInterceptor"
;
return
INTERCEPT_CLASS
;
}
@Override
public
boolean
isOverrideArgs
()
{
...
...
apm-sniffer/apm-toolkit-activation/apm-toolkit-logback-1.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/logback/v1/x/mdc/MDCConverterActivation.java
浏览文件 @
41399183
...
...
@@ -34,6 +34,10 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
*/
public
class
MDCConverterActivation
extends
ClassInstanceMethodsEnhancePluginDefine
{
public
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.toolkit.activation.log.logback.v1.x.mdc.PrintMDCTraceIdInterceptor"
;
public
static
final
String
ENHANCE_CLASS
=
"org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.LogbackMDCPatternConverter"
;
public
static
final
String
ENHANCE_METHOD
=
"convertTID"
;
@Override
protected
ConstructorInterceptPoint
[]
getConstructorsInterceptPoints
()
{
return
null
;
...
...
@@ -45,12 +49,12 @@ public class MDCConverterActivation extends ClassInstanceMethodsEnhancePluginDef
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"convertTID"
);
return
named
(
ENHANCE_METHOD
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
"PrintMDCTraceIdInterceptor"
;
return
INTERCEPT_CLASS
;
}
@Override
public
boolean
isOverrideArgs
()
{
...
...
@@ -62,6 +66,6 @@ public class MDCConverterActivation extends ClassInstanceMethodsEnhancePluginDef
@Override
protected
ClassMatch
enhanceClass
()
{
return
NameMatch
.
byName
(
"org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.LogbackMDCPatternConverter"
);
return
NameMatch
.
byName
(
ENHANCE_CLASS
);
}
}
apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TraceContextActivation.java
浏览文件 @
41399183
...
...
@@ -37,12 +37,17 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
* Created by xin on 2016/12/15.
*/
public
class
TraceContextActivation
extends
ClassStaticMethodsEnhancePluginDefine
{
public
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.toolkit.activation.trace.TraceContextInterceptor"
;
public
static
final
String
ENHANCE_CLASS
=
"org.apache.skywalking.apm.toolkit.trace.TraceContext"
;
public
static
final
String
ENHANCE_METHOD
=
"traceId"
;
/**
* @return the target class, which needs active.
*/
@Override
protected
ClassMatch
enhanceClass
()
{
return
NameMatch
.
byName
(
"TraceContext"
);
return
NameMatch
.
byName
(
ENHANCE_CLASS
);
}
/**
...
...
@@ -55,12 +60,12 @@ public class TraceContextActivation extends ClassStaticMethodsEnhancePluginDefin
new
StaticMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"traceId"
);
return
named
(
ENHANCE_METHOD
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
"TraceContextInterceptor"
;
return
INTERCEPT_CLASS
;
}
@Override
public
boolean
isOverrideArgs
()
{
...
...
docs/Supported-list.md
浏览文件 @
41399183
...
...
@@ -44,6 +44,7 @@
*
Spring Ecosystem
*
Spring Bean annotations(@Bean, @Service, @Component, @Repository) 3.x and 4.x (Optional²)
*
Spring Core Async SuccessCallback/FailureCallback/ListenableFutureCallback 4.x
*
[
Hystrix: Latency and Fault Tolerance for Distributed Systems
](
https://github.com/Netflix/Hystrix
)
1.4.20 -> 1.5.12
*
Scheduler
*
[
Elastic Job
](
https://github.com/elasticjob/elastic-job
)
2.x
*
OpenTracing community supported
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录