Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
2e9f0016
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
2e9f0016
编写于
3月 20, 2020
作者:
C
cngdkxw
提交者:
GitHub
3月 20, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add spring cloud feign 2.x plugin (#4526)
上级
5251cc72
变更
44
隐藏空白更改
内联
并排
Showing
44 changed file
with
2000 addition
and
21 deletion
+2000
-21
.github/workflows/plugins-test.yaml
.github/workflows/plugins-test.yaml
+6
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/netflix-plugins/spring-cloud-feign-1.x-plugin/pom.xml
...oud/netflix-plugins/spring-cloud-feign-1.x-plugin/pom.xml
+1
-20
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/pom.xml
...niffer/apm-sdk-plugin/spring-plugins/spring-cloud/pom.xml
+1
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/spring-cloud-feign-2.x-plugin/pom.xml
...lugins/spring-cloud/spring-cloud-feign-2.x-plugin/pom.xml
+36
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/spring-cloud-feign-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/string/cloud/netflix/feign/v2/define/LoadBalancerFeignClientInstrumentation.java
...ign/v2/define/LoadBalancerFeignClientInstrumentation.java
+68
-0
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/spring-cloud-feign-2.x-plugin/src/main/resources/skywalking-plugin.def
...feign-2.x-plugin/src/main/resources/skywalking-plugin.def
+17
-0
docs/en/setup/service-agent/java-agent/Supported-list.md
docs/en/setup/service-agent/java-agent/Supported-list.md
+1
-1
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/bin/startup.sh
...cenarios/spring-cloud-feign-1.1.x-scenario/bin/startup.sh
+21
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/config/expectedData.yaml
...pring-cloud-feign-1.1.x-scenario/config/expectedData.yaml
+104
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/configuration.yml
...arios/spring-cloud-feign-1.1.x-scenario/configuration.yml
+23
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/pom.xml
...lugin/scenarios/spring-cloud-feign-1.1.x-scenario/pom.xml
+130
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/assembly/assembly.xml
...cloud-feign-1.1.x-scenario/src/main/assembly/assembly.xml
+41
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/Application.java
...org/apache/skywalking/apm/testcase/feign/Application.java
+36
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/BackController.java
...walking/apm/testcase/feign/controller/BackController.java
+32
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/CaseController.java
...walking/apm/testcase/feign/controller/CaseController.java
+45
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestRequest.java
...skywalking/apm/testcase/feign/controller/RestRequest.java
+30
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/resources/application.yaml
...-feign-1.1.x-scenario/src/main/resources/application.yaml
+25
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/resources/log4j2.xml
...-cloud-feign-1.1.x-scenario/src/main/resources/log4j2.xml
+30
-0
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/support-version.list
...os/spring-cloud-feign-1.1.x-scenario/support-version.list
+23
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/bin/startup.sh
...cenarios/spring-cloud-feign-1.2.x-scenario/bin/startup.sh
+21
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/config/expectedData.yaml
...pring-cloud-feign-1.2.x-scenario/config/expectedData.yaml
+104
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/configuration.yml
...arios/spring-cloud-feign-1.2.x-scenario/configuration.yml
+23
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/pom.xml
...lugin/scenarios/spring-cloud-feign-1.2.x-scenario/pom.xml
+130
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/assembly/assembly.xml
...cloud-feign-1.2.x-scenario/src/main/assembly/assembly.xml
+41
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/Application.java
...org/apache/skywalking/apm/testcase/feign/Application.java
+36
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/BackController.java
...walking/apm/testcase/feign/controller/BackController.java
+32
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/CaseController.java
...walking/apm/testcase/feign/controller/CaseController.java
+49
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestRequest.java
...skywalking/apm/testcase/feign/controller/RestRequest.java
+30
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/resources/application.yaml
...-feign-1.2.x-scenario/src/main/resources/application.yaml
+25
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/resources/log4j2.xml
...-cloud-feign-1.2.x-scenario/src/main/resources/log4j2.xml
+30
-0
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/support-version.list
...os/spring-cloud-feign-1.2.x-scenario/support-version.list
+38
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/bin/startup.sh
.../scenarios/spring-cloud-feign-2.x-scenario/bin/startup.sh
+21
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/config/expectedData.yaml
.../spring-cloud-feign-2.x-scenario/config/expectedData.yaml
+225
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/configuration.yml
...enarios/spring-cloud-feign-2.x-scenario/configuration.yml
+23
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/pom.xml
.../plugin/scenarios/spring-cloud-feign-2.x-scenario/pom.xml
+127
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/assembly/assembly.xml
...g-cloud-feign-2.x-scenario/src/main/assembly/assembly.xml
+41
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/Application.java
...org/apache/skywalking/apm/testcase/feign/Application.java
+36
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/BackController.java
...walking/apm/testcase/feign/controller/BackController.java
+65
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/CaseController.java
...walking/apm/testcase/feign/controller/CaseController.java
+55
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestRequest.java
...skywalking/apm/testcase/feign/controller/RestRequest.java
+40
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/entity/User.java
...org/apache/skywalking/apm/testcase/feign/entity/User.java
+53
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/resources/application.yaml
...ud-feign-2.x-scenario/src/main/resources/application.yaml
+26
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/resources/log4j2.xml
...ng-cloud-feign-2.x-scenario/src/main/resources/log4j2.xml
+30
-0
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/support-version.list
...rios/spring-cloud-feign-2.x-scenario/support-version.list
+29
-0
未找到文件。
.github/workflows/plugins-test.yaml
浏览文件 @
2e9f0016
...
...
@@ -159,6 +159,12 @@ jobs:
run
:
./mvnw --batch-mode -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null
-
name
:
Run feign 9.0.0-9.5.1 (8)
run
:
bash test/plugin/run.sh feign-scenario
-
name
:
Run springcloud feign 1.1.x (8)
run
:
bash test/plugin/run.sh spring-cloud-feign-1.1.x-scenario
-
name
:
Run springcloud feign 1.2.x-1.4.x (23)
run
:
bash test/plugin/run.sh spring-cloud-feign-1.2.x-scenario
-
name
:
Run springcloud feign 2.x (14)
run
:
bash test/plugin/run.sh spring-cloud-feign-2.x-scenario
-
name
:
Run customize (1)
run
:
bash test/plugin/run.sh customize-scenario
-
name
:
Run canal 1.0.24-1.1.2 (5)
...
...
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/netflix-plugins/spring-cloud-feign-1.x-plugin/pom.xml
浏览文件 @
2e9f0016
...
...
@@ -29,27 +29,8 @@
<artifactId>
apm-spring-cloud-feign-1.x-plugin
</artifactId>
<packaging>
jar
</packaging>
<!-- only support spring cloud feign 1.1.x, 1.2.x, 1.3.x -->
<!-- only support spring cloud feign 1.1.x, 1.2.x, 1.3.x
1.4.x
-->
<name>
spring-cloud-feign-1.x-plugin
</name>
<url>
http://maven.apache.org
</url>
<properties>
<spring-cloud-starter-feign.version>
1.1.0.RELEASE
</spring-cloud-starter-feign.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-feign
</artifactId>
<version>
${spring-cloud-starter-feign.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
apm-feign-default-http-9.x-plugin
</artifactId>
<version>
${project.version}
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</project>
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/pom.xml
浏览文件 @
2e9f0016
...
...
@@ -29,6 +29,7 @@
<artifactId>
spring-cloud
</artifactId>
<modules>
<module>
netflix-plugins
</module>
<module>
spring-cloud-feign-2.x-plugin
</module>
</modules>
<packaging>
pom
</packaging>
...
...
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/spring-cloud-feign-2.x-plugin/pom.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<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"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
spring-cloud
</artifactId>
<version>
7.1.0-SNAPSHOT
</version>
</parent>
<artifactId>
apm-spring-cloud-feign-2.x-plugin
</artifactId>
<packaging>
jar
</packaging>
<name>
apm-spring-cloud-feign-2.x-plugin
</name>
<url>
http://maven.apache.org
</url>
</project>
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/spring-cloud-feign-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/string/cloud/netflix/feign/v2/define/LoadBalancerFeignClientInstrumentation.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.string.cloud.netflix.feign.v2.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
LoadBalancerFeignClientInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
public
static
final
String
ENHANCE_CLASS
=
"org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient"
;
private
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.plugin.feign.http.v9.DefaultHttpClientInterceptor"
;
@Override
protected
ClassMatch
enhanceClass
()
{
return
byName
(
ENHANCE_CLASS
);
}
@Override
public
ConstructorInterceptPoint
[]
getConstructorsInterceptPoints
()
{
return
new
ConstructorInterceptPoint
[
0
];
}
@Override
public
InstanceMethodsInterceptPoint
[]
getInstanceMethodsInterceptPoints
()
{
return
new
InstanceMethodsInterceptPoint
[]{
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
named
(
"execute"
);
}
@Override
public
String
getMethodsInterceptor
()
{
return
INTERCEPT_CLASS
;
}
@Override
public
boolean
isOverrideArgs
()
{
return
false
;
}
}
};
}
}
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-cloud/spring-cloud-feign-2.x-plugin/src/main/resources/skywalking-plugin.def
0 → 100644
浏览文件 @
2e9f0016
# 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.
spring-cloud-feign-2.x=org.apache.skywalking.apm.plugin.string.cloud.netflix.feign.v2.define.LoadBalancerFeignClientInstrumentation
docs/en/setup/service-agent/java-agent/Supported-list.md
浏览文件 @
2e9f0016
...
...
@@ -17,7 +17,7 @@
*
[
Netty SocketIO
](
https://github.com/mrniko/netty-socketio
)
1.x
*
HTTP Client
*
[
Feign
](
https://github.com/OpenFeign/feign
)
9.x
*
[
Netflix Spring Cloud Feign
](
https://github.com/spring-cloud/spring-cloud-
netflix/tree/master/spring-cloud-starter-feign
)
1.1.x, 1.2.x, 1.3
.x
*
[
Netflix Spring Cloud Feign
](
https://github.com/spring-cloud/spring-cloud-
openfeign
)
1.1.x -> 2
.x
*
[
Okhttp
](
https://github.com/square/okhttp
)
3.x
*
[
Apache httpcomponent HttpClient
](
http://hc.apache.org/
)
2.0 -> 3.1, 4.2, 4.3
*
[
Spring RestTemplete
](
https://github.com/spring-projects/spring-framework
)
4.x
...
...
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/bin/startup.sh
0 → 100644
浏览文件 @
2e9f0016
#!/bin/bash
#
# 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.
home
=
"
$(
cd
"
$(
dirname
$0
)
"
;
pwd
)
"
java
-jar
${
agent_opts
}
${
home
}
/../libs/spring-cloud-feign-1.1.x-scenario.jar &
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/config/expectedData.yaml
0 → 100644
浏览文件 @
2e9f0016
# 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.
registryItems
:
services
:
-
{
spring-cloud-feign-1.1.x-scenario
:
nq 0
}
instances
:
-
{
spring-cloud-feign-1.1.x-scenario
:
1
}
operationNames
:
-
spring-cloud-feign-1.1.x-scenario
:
[
/spring-cloud-feign-1.1.x-scenario/case/spring-cloud-feign-1.1.x-scenario
,
/spring-cloud-feign-1.1.x-scenario/get
]
heartbeat
:
[]
segmentItems
:
-
serviceName
:
spring-cloud-feign-1.1.x-scenario
segmentSize
:
ge
2
segments
:
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-1.1.x-scenario/case/healthCheck
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-1.1.x-scenario/case/healthCheck'
}
-
{
key
:
http.method
,
value
:
HEAD
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-1.1.x-scenario/get
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-1.1.x-scenario/get'
}
-
{
key
:
http.method
,
value
:
GET
}
refs
:
-
{
parentEndpointId
:
0
,
parentEndpoint
:
/spring-cloud-feign-1.1.x-scenario/case/spring-cloud-feign-1.1.x-scenario
,
networkAddressId
:
0
,
entryEndpointId
:
0
,
refType
:
CrossProcess
,
parentSpanId
:
1
,
parentTraceSegmentId
:
not null
,
parentServiceInstanceId
:
1
,
networkAddress
:
'
localhost:8080'
,
entryEndpoint
:
/spring-cloud-feign-1.1.x-scenario/case/spring-cloud-feign-1.1.x-scenario
,
entryServiceInstanceId
:
1
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-1.1.x-scenario/get
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
peerId
:
0
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-1.1.x-scenario/get'
}
-
operationName
:
/spring-cloud-feign-1.1.x-scenario/case/spring-cloud-feign-1.1.x-scenario
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-1.1.x-scenario/case/spring-cloud-feign-1.1.x-scenario'
}
-
{
key
:
http.method
,
value
:
GET
}
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/configuration.yml
0 → 100644
浏览文件 @
2e9f0016
# 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.
type
:
jvm
entryService
:
http://localhost:8080/spring-cloud-feign-1.1.x-scenario/case/spring-cloud-feign-1.1.x-scenario
healthCheck
:
http://localhost:8080/spring-cloud-feign-1.1.x-scenario/case/healthCheck
startScript
:
./bin/startup.sh
framework
:
spring-cloud-feign-1.1.x-scenario
environment
:
dependencies
:
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/pom.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<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"
>
<groupId>
org.apache.skywalking.apm.testcase
</groupId>
<artifactId>
spring-cloud-feign-1.1.x-scenario
</artifactId>
<version>
7.0.0
</version>
<packaging>
jar
</packaging>
<modelVersion>
4.0.0
</modelVersion>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<compiler.version>
1.8
</compiler.version>
<test.framework.version>
1.1.0.RELEASE
</test.framework.version>
<spring.boot.version>
1.3.0.RELEASE
</spring.boot.version>
</properties>
<name>
skywalking-spring-cloud-feign-1.1.x-scenario
</name>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
${spring.boot.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-log4j2
</artifactId>
<exclusions>
<exclusion>
<artifactId>
jul-to-slf4j
</artifactId>
<groupId>
org.slf4j
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-feign
</artifactId>
<version>
${test.framework.version}
</version>
<exclusions>
<exclusion>
<groupId>
com.netflix.feign
</groupId>
<artifactId>
feign-hystrix
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<finalName>
spring-cloud-feign-1.1.x-scenario
</finalName>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
1.5.9.RELEASE
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
${compiler.version}
</source>
<target>
${compiler.version}
</target>
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
assemble
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
<outputDirectory>
./target/
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<formats>
<format>
zip
</format>
</formats>
<fileSets>
<fileSet>
<directory>
./bin
</directory>
<fileMode>
0775
</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>
${project.build.directory}/spring-cloud-feign-1.1.x-scenario.jar
</source>
<outputDirectory>
./libs
</outputDirectory>
<fileMode>
0775
</fileMode>
</file>
</files>
</assembly>
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/Application.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.feign.EnableFeignClients
;
@SpringBootApplication
@EnableFeignClients
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
try
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
catch
(
Exception
e
)
{
// Never do this
}
}
}
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/BackController.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
BackController
{
@RequestMapping
(
value
=
"/get"
,
method
=
RequestMethod
.
GET
)
public
String
getUser
()
{
return
"Hello"
;
}
}
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/CaseController.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@Controller
@RequestMapping
(
"/case"
)
public
class
CaseController
{
@Autowired
private
RestRequest
restRequest
;
@ResponseBody
@RequestMapping
(
"/healthCheck"
)
public
String
healthcheck
()
{
return
"Success"
;
}
@ResponseBody
@RequestMapping
(
"/spring-cloud-feign-1.1.x-scenario"
)
public
String
feignCase
()
{
restRequest
.
getById
();
return
"success"
;
}
}
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestRequest.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
@FeignClient
(
value
=
"spring-cloud-feign-1.1.x-scenario"
,
url
=
"localhost:8080/spring-cloud-feign-1.1.x-scenario"
)
public
interface
RestRequest
{
@RequestMapping
(
value
=
"/get"
,
method
=
RequestMethod
.
GET
)
String
getById
();
}
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/resources/application.yaml
0 → 100644
浏览文件 @
2e9f0016
#
# 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.
#
#
server
:
port
:
8080
context-path
:
/spring-cloud-feign-1.1.x-scenario
logging
:
config
:
classpath:log4j2.xml
spring
:
application
:
name
:
spring-cloud-feign-1.1.x-scenario
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/src/main/resources/log4j2.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<Configuration
status=
"WARN"
>
<Appenders>
<Console
name=
"Console"
target=
"SYSTEM_ERR"
>
<PatternLayout
charset=
"UTF-8"
pattern=
"[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"
/>
</Console>
</Appenders>
<Loggers>
<Root
level=
"WARN"
>
<AppenderRef
ref=
"Console"
/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-1.1.x-scenario/support-version.list
0 → 100644
浏览文件 @
2e9f0016
# 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
# "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.
1.1.0.RELEASE
1.1.1.RELEASE
1.1.2.RELEASE
1.1.3.RELEASE
1.1.4.RELEASE
1.1.5.RELEASE
1.1.6.RELEASE
1.1.7.RELEASE
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/bin/startup.sh
0 → 100644
浏览文件 @
2e9f0016
#!/bin/bash
#
# 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.
home
=
"
$(
cd
"
$(
dirname
$0
)
"
;
pwd
)
"
java
-jar
${
agent_opts
}
${
home
}
/../libs/spring-cloud-feign-1.2.x-scenario.jar &
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/config/expectedData.yaml
0 → 100644
浏览文件 @
2e9f0016
# 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.
registryItems
:
services
:
-
{
spring-cloud-feign-1.2.x-scenario
:
nq 0
}
instances
:
-
{
spring-cloud-feign-1.2.x-scenario
:
1
}
operationNames
:
-
spring-cloud-feign-1.2.x-scenario
:
[
/spring-cloud-feign-1.2.x-scenario/case/spring-cloud-feign-1.2.x-scenario
,
/spring-cloud-feign-1.2.x-scenario/get
]
heartbeat
:
[]
segmentItems
:
-
serviceName
:
spring-cloud-feign-1.2.x-scenario
segmentSize
:
ge
2
segments
:
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-1.2.x-scenario/case/healthCheck
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-1.2.x-scenario/case/healthCheck'
}
-
{
key
:
http.method
,
value
:
HEAD
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-1.2.x-scenario/get
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-1.2.x-scenario/get'
}
-
{
key
:
http.method
,
value
:
GET
}
refs
:
-
{
parentEndpointId
:
0
,
parentEndpoint
:
/spring-cloud-feign-1.2.x-scenario/case/spring-cloud-feign-1.2.x-scenario
,
networkAddressId
:
0
,
entryEndpointId
:
0
,
refType
:
CrossProcess
,
parentSpanId
:
1
,
parentTraceSegmentId
:
not null
,
parentServiceInstanceId
:
1
,
networkAddress
:
'
localhost:8080'
,
entryEndpoint
:
/spring-cloud-feign-1.2.x-scenario/case/spring-cloud-feign-1.2.x-scenario
,
entryServiceInstanceId
:
1
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-1.2.x-scenario/get
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
peerId
:
0
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-1.2.x-scenario/get'
}
-
operationName
:
/spring-cloud-feign-1.2.x-scenario/case/spring-cloud-feign-1.2.x-scenario
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-1.2.x-scenario/case/spring-cloud-feign-1.2.x-scenario'
}
-
{
key
:
http.method
,
value
:
GET
}
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/configuration.yml
0 → 100644
浏览文件 @
2e9f0016
# 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.
type
:
jvm
entryService
:
http://localhost:8080/spring-cloud-feign-1.2.x-scenario/case/spring-cloud-feign-1.2.x-scenario
healthCheck
:
http://localhost:8080/spring-cloud-feign-1.2.x-scenario/case/healthCheck
startScript
:
./bin/startup.sh
framework
:
spring-cloud-feign-1.2.x-scenario
environment
:
dependencies
:
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/pom.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<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"
>
<groupId>
org.apache.skywalking.apm.testcase
</groupId>
<artifactId>
spring-cloud-feign-1.2.x-scenario
</artifactId>
<version>
7.0.0
</version>
<packaging>
jar
</packaging>
<modelVersion>
4.0.0
</modelVersion>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<compiler.version>
1.8
</compiler.version>
<test.framework.version>
1.3.0.RELEASE
</test.framework.version>
<spring.boot.version>
1.5.0.RELEASE
</spring.boot.version>
</properties>
<name>
skywalking-spring-cloud-feign-1.2.x-scenario
</name>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
${spring.boot.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-log4j2
</artifactId>
<exclusions>
<exclusion>
<artifactId>
jul-to-slf4j
</artifactId>
<groupId>
org.slf4j
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-feign
</artifactId>
<version>
${test.framework.version}
</version>
<exclusions>
<exclusion>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-hystrix
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<finalName>
spring-cloud-feign-1.2.x-scenario
</finalName>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
1.5.9.RELEASE
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
${compiler.version}
</source>
<target>
${compiler.version}
</target>
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
assemble
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
<outputDirectory>
./target/
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<formats>
<format>
zip
</format>
</formats>
<fileSets>
<fileSet>
<directory>
./bin
</directory>
<fileMode>
0775
</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>
${project.build.directory}/spring-cloud-feign-1.2.x-scenario.jar
</source>
<outputDirectory>
./libs
</outputDirectory>
<fileMode>
0775
</fileMode>
</file>
</files>
</assembly>
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/Application.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.feign.EnableFeignClients
;
@SpringBootApplication
@EnableFeignClients
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
try
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
catch
(
Exception
e
)
{
// Never do this
}
}
}
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/BackController.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
BackController
{
@RequestMapping
(
value
=
"/get"
,
method
=
RequestMethod
.
GET
)
public
String
getUser
()
{
return
"Hello"
;
}
}
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/CaseController.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@Controller
@RequestMapping
(
"/case"
)
public
class
CaseController
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
CaseController
.
class
);
@Autowired
private
RestRequest
restRequest
;
@ResponseBody
@RequestMapping
(
"/healthCheck"
)
public
String
healthcheck
()
{
return
"Success"
;
}
@ResponseBody
@RequestMapping
(
"/spring-cloud-feign-1.2.x-scenario"
)
public
String
feignCase
()
{
String
user
=
restRequest
.
getById
();
logger
.
info
(
user
);
return
"success"
;
}
}
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestRequest.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
@FeignClient
(
value
=
"spring-cloud-feign-1.2.x-scenario"
,
url
=
"localhost:8080/spring-cloud-feign-1.2.x-scenario"
)
public
interface
RestRequest
{
@RequestMapping
(
value
=
"/get"
,
method
=
RequestMethod
.
GET
)
String
getById
();
}
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/resources/application.yaml
0 → 100644
浏览文件 @
2e9f0016
#
# 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.
#
#
server
:
port
:
8080
context-path
:
/spring-cloud-feign-1.2.x-scenario
logging
:
config
:
classpath:log4j2.xml
spring
:
application
:
name
:
spring-cloud-feign-1.2.x-scenario
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/src/main/resources/log4j2.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<Configuration
status=
"WARN"
>
<Appenders>
<Console
name=
"Console"
target=
"SYSTEM_ERR"
>
<PatternLayout
charset=
"UTF-8"
pattern=
"[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"
/>
</Console>
</Appenders>
<Loggers>
<Root
level=
"WARN"
>
<AppenderRef
ref=
"Console"
/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-1.2.x-scenario/support-version.list
0 → 100644
浏览文件 @
2e9f0016
# 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
# "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.
1.2.0.RELEASE
1.2.1.RELEASE
1.2.2.RELEASE
1.2.3.RELEASE
1.2.4.RELEASE
1.2.5.RELEASE
1.2.6.RELEASE
1.2.7.RELEASE
1.3.0.RELEASE
1.3.1.RELEASE
1.3.2.RELEASE
#1.3.3.RELEASE
1.3.4.RELEASE
1.3.5.RELEASE
1.3.6.RELEASE
1.4.0.RELEASE
1.4.1.RELEASE
1.4.2.RELEASE
1.4.3.RELEASE
1.4.4.RELEASE
1.4.5.RELEASE
1.4.6.RELEASE
1.4.7.RELEASE
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/bin/startup.sh
0 → 100644
浏览文件 @
2e9f0016
#!/bin/bash
#
# 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.
home
=
"
$(
cd
"
$(
dirname
$0
)
"
;
pwd
)
"
java
-jar
${
agent_opts
}
${
home
}
/../libs/spring-cloud-feign-2.x-scenario.jar &
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/config/expectedData.yaml
0 → 100644
浏览文件 @
2e9f0016
# 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.
registryItems
:
services
:
-
{
spring-cloud-feign-2.x-scenario
:
nq 0
}
instances
:
-
{
spring-cloud-feign-2.x-scenario
:
1
}
operationNames
:
-
spring-cloud-feign-2.x-scenario
:
[
/spring-cloud-feign-2.x-scenario/update/1
,
/spring-cloud-feign-2.x-scenario/create/
,
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
/spring-cloud-feign-2.x-scenario/delete/1
,
/spring-cloud-feign-2.x-scenario/get/1
]
heartbeat
:
[]
segmentItems
:
-
serviceName
:
spring-cloud-feign-2.x-scenario
segmentSize
:
ge
5
segments
:
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-2.x-scenario/case/healthCheck
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/case/healthCheck'
}
-
{
key
:
http.method
,
value
:
HEAD
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-2.x-scenario/create/
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/create/'
}
-
{
key
:
http.method
,
value
:
POST
}
refs
:
-
{
parentEndpointId
:
0
,
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddressId
:
0
,
entryEndpointId
:
0
,
refType
:
CrossProcess
,
parentSpanId
:
1
,
parentTraceSegmentId
:
not null
,
parentServiceInstanceId
:
1
,
networkAddress
:
'
localhost:8080'
,
entryEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
entryServiceInstanceId
:
1
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-2.x-scenario/create/
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
peerId
:
0
tags
:
-
{
key
:
http.method
,
value
:
POST
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/create/'
}
-
operationName
:
/spring-cloud-feign-2.x-scenario/get/{id}
operationId
:
0
parentSpanId
:
0
spanId
:
2
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
peerId
:
0
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/get/1'
}
-
operationName
:
/spring-cloud-feign-2.x-scenario/update/{id}
operationId
:
0
parentSpanId
:
0
spanId
:
3
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
peerId
:
0
tags
:
-
{
key
:
http.method
,
value
:
PUT
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/update/1'
}
-
operationName
:
/spring-cloud-feign-2.x-scenario/delete/{id}
operationId
:
0
parentSpanId
:
0
spanId
:
4
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
peerId
:
0
tags
:
-
{
key
:
http.method
,
value
:
DELETE
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/delete/1'
}
-
operationName
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario'
}
-
{
key
:
http.method
,
value
:
GET
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-2.x-scenario/get/1
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/get/1'
}
-
{
key
:
http.method
,
value
:
GET
}
refs
:
-
{
parentEndpointId
:
0
,
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddressId
:
0
,
entryEndpointId
:
0
,
refType
:
CrossProcess
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstanceId
:
1
,
networkAddress
:
'
localhost:8080'
,
entryEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
entryServiceInstanceId
:
1
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-2.x-scenario/update/1
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/update/1'
}
-
{
key
:
http.method
,
value
:
PUT
}
refs
:
-
{
parentEndpointId
:
0
,
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddressId
:
0
,
entryEndpointId
:
0
,
refType
:
CrossProcess
,
parentSpanId
:
3
,
parentTraceSegmentId
:
not null
,
parentServiceInstanceId
:
1
,
networkAddress
:
'
localhost:8080'
,
entryEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
entryServiceInstanceId
:
1
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-2.x-scenario/delete/1
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/delete/1'
}
-
{
key
:
http.method
,
value
:
DELETE
}
refs
:
-
{
parentEndpointId
:
0
,
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddressId
:
0
,
entryEndpointId
:
0
,
refType
:
CrossProcess
,
parentSpanId
:
4
,
parentTraceSegmentId
:
not null
,
parentServiceInstanceId
:
1
,
networkAddress
:
'
localhost:8080'
,
entryEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
entryServiceInstanceId
:
1
}
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/configuration.yml
0 → 100644
浏览文件 @
2e9f0016
# 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.
type
:
jvm
entryService
:
http://localhost:8080/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
healthCheck
:
http://localhost:8080/spring-cloud-feign-2.x-scenario/case/healthCheck
startScript
:
./bin/startup.sh
framework
:
spring-cloud-feign-2.x-scenario
environment
:
dependencies
:
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/pom.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<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"
>
<groupId>
org.apache.skywalking.apm.testcase
</groupId>
<artifactId>
spring-cloud-feign-2.x-scenario
</artifactId>
<version>
7.0.0
</version>
<packaging>
jar
</packaging>
<modelVersion>
4.0.0
</modelVersion>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<compiler.version>
1.8
</compiler.version>
<test.framework.version>
2.1.2.RELEASE
</test.framework.version>
</properties>
<name>
skywalking-spring-cloud-feign-2.x-scenario
</name>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
${test.framework.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-log4j2
</artifactId>
<exclusions>
<exclusion>
<artifactId>
jul-to-slf4j
</artifactId>
<groupId>
org.slf4j
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<version>
${test.framework.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-ribbon
</artifactId>
<version>
${test.framework.version}
</version>
</dependency>
</dependencies>
<build>
<finalName>
spring-cloud-feign-2.x-scenario
</finalName>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
1.5.9.RELEASE
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
${compiler.version}
</source>
<target>
${compiler.version}
</target>
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
assemble
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
<outputDirectory>
./target/
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<formats>
<format>
zip
</format>
</formats>
<fileSets>
<fileSet>
<directory>
./bin
</directory>
<fileMode>
0775
</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>
${project.build.directory}/spring-cloud-feign-2.x-scenario.jar
</source>
<outputDirectory>
./libs
</outputDirectory>
<fileMode>
0775
</fileMode>
</file>
</files>
</assembly>
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/Application.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
@SpringBootApplication
@EnableFeignClients
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
try
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
catch
(
Exception
e
)
{
// Never do this
}
}
}
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/BackController.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.apache.skywalking.apm.testcase.feign.entity.User
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.util.UriComponentsBuilder
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
@RestController
public
class
BackController
{
private
static
final
Map
<
Integer
,
User
>
users
=
new
ConcurrentHashMap
<>();
@GetMapping
(
"/get/{id}"
)
public
ResponseEntity
<
User
>
getUser
(
@PathVariable
(
"id"
)
int
id
)
{
User
currentUser
=
users
.
get
(
id
);
return
ResponseEntity
.
ok
(
currentUser
);
}
@PostMapping
(
value
=
"/create/"
)
public
ResponseEntity
<
Void
>
createUser
(
@RequestBody
User
user
,
UriComponentsBuilder
ucBuilder
)
{
users
.
put
(
user
.
getId
(),
user
);
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setLocation
(
ucBuilder
.
path
(
"/user/{id}"
).
buildAndExpand
(
user
.
getId
()).
toUri
());
return
new
ResponseEntity
<>(
headers
,
HttpStatus
.
CREATED
);
}
@PutMapping
(
value
=
"/update/{id}"
)
public
ResponseEntity
<
User
>
updateUser
(
@PathVariable
(
"id"
)
int
id
,
@RequestBody
User
user
)
{
User
currentUser
=
new
User
(
id
,
user
.
getUserName
());
return
ResponseEntity
.
ok
(
currentUser
);
}
@DeleteMapping
(
value
=
"/delete/{id}"
)
public
ResponseEntity
<
User
>
deleteUser
(
@PathVariable
(
"id"
)
int
id
)
{
User
currentUser
=
users
.
get
(
id
);
if
(
currentUser
==
null
)
{
return
ResponseEntity
.
noContent
().
build
();
}
users
.
remove
(
id
);
return
ResponseEntity
.
noContent
().
build
();
}
}
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/CaseController.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.skywalking.apm.testcase.feign.entity.User
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@Controller
@RequestMapping
(
"/case"
)
public
class
CaseController
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
CaseController
.
class
);
private
RestRequest
restRequest
;
public
CaseController
(
RestRequest
restRequest
)
{
this
.
restRequest
=
restRequest
;
}
@ResponseBody
@RequestMapping
(
"/healthCheck"
)
public
String
healthcheck
()
{
return
"Success"
;
}
@ResponseBody
@RequestMapping
(
"/spring-cloud-feign-2.x-scenario"
)
public
String
feignCase
()
{
restRequest
.
createUser
(
new
User
(
1
,
"test"
));
User
user
=
restRequest
.
getById
(
1
);
logger
.
info
(
"find Id{} user. User name is {} "
,
user
.
getId
(),
user
.
getUserName
());
restRequest
.
updateUser
(
1
,
new
User
(
0
,
"testA"
));
restRequest
.
deleteUser
(
1
);
return
"success"
;
}
}
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestRequest.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.controller
;
import
org.apache.skywalking.apm.testcase.feign.entity.User
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
@FeignClient
(
value
=
"spring-cloud-feign-2.x-scenario"
,
url
=
"localhost:8080"
,
path
=
"/spring-cloud-feign-2.x-scenario"
)
public
interface
RestRequest
{
@GetMapping
(
"/get/{id}"
)
User
getById
(
@PathVariable
(
"id"
)
int
id
);
@PostMapping
(
value
=
"/create/"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
void
createUser
(
@RequestBody
User
user
);
@PutMapping
(
value
=
"/update/{id}"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
User
updateUser
(
@PathVariable
(
"id"
)
int
id
,
@RequestBody
User
user
);
@DeleteMapping
(
"/delete/{id}"
)
void
deleteUser
(
@PathVariable
(
"id"
)
int
id
);
}
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/entity/User.java
0 → 100644
浏览文件 @
2e9f0016
/*
* 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.testcase.feign.entity
;
public
class
User
{
private
int
id
;
private
String
userName
;
public
User
(
int
id
)
{
this
.
id
=
id
;
}
public
User
(
int
id
,
String
userName
)
{
this
.
id
=
id
;
this
.
userName
=
userName
;
}
public
User
()
{
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
}
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/resources/application.yaml
0 → 100644
浏览文件 @
2e9f0016
#
# 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.
#
#
server
:
port
:
8080
servlet
:
context-path
:
/spring-cloud-feign-2.x-scenario
logging
:
config
:
classpath:log4j2.xml
spring
:
application
:
name
:
spring-cloud-feign-2.x-scenario
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/resources/log4j2.xml
0 → 100644
浏览文件 @
2e9f0016
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<Configuration
status=
"WARN"
>
<Appenders>
<Console
name=
"Console"
target=
"SYSTEM_ERR"
>
<PatternLayout
charset=
"UTF-8"
pattern=
"[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"
/>
</Console>
</Appenders>
<Loggers>
<Root
level=
"WARN"
>
<AppenderRef
ref=
"Console"
/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/support-version.list
0 → 100644
浏览文件 @
2e9f0016
# 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
# "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.
2.0.0.RELEASE
2.0.1.RELEASE
2.0.2.RELEASE
2.0.3.RELEASE
2.0.4.RELEASE
2.1.0.RELEASE
2.1.1.RELEASE
2.1.2.RELEASE
2.1.3.RELEASE
2.1.4.RELEASE
2.1.5.RELEASE
2.2.0.RELEASE
2.2.1.RELEASE
2.2.2.RELEASE
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录