Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
六月暴雪飞梨花
SkyWalking
提交
63d63ed7
S
SkyWalking
项目概览
六月暴雪飞梨花
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
63d63ed7
编写于
10月 21, 2020
作者:
Z
zifeihan
提交者:
GitHub
10月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add feign loadbalancer case for spring-cloud-feign-2.x-scenario plugin. (#5700)
上级
d8f1d01a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
263 addition
and
187 deletion
+263
-187
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/config/expectedData.yaml
.../spring-cloud-feign-2.x-scenario/config/expectedData.yaml
+245
-185
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
+11
-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
+7
-2
未找到文件。
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/config/expectedData.yaml
浏览文件 @
63d63ed7
...
...
@@ -14,188 +14,248 @@
# See the License for the specific language governing permissions and
# limitations under the License.
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/case/healthCheck'
}
-
{
key
:
http.method
,
value
:
HEAD
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/create/'
}
-
{
key
:
http.method
,
value
:
POST
}
refs
:
-
{
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
1
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
spring-cloud-feign-2.x-scenario
,
traceId
:
not null
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
tags
:
-
{
key
:
http.method
,
value
:
POST
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/create/'
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/get/1'
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
tags
:
-
{
key
:
http.method
,
value
:
PUT
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/update/1'
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
tags
:
-
{
key
:
http.method
,
value
:
DELETE
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/delete/1'
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
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
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/get/1'
}
-
{
key
:
http.method
,
value
:
GET
}
refs
:
-
{
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
spring-cloud-feign-2.x-scenario
,
traceId
:
not null
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/update/1'
}
-
{
key
:
http.method
,
value
:
PUT
}
refs
:
-
{
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
3
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
spring-cloud-feign-2.x-scenario
,
traceId
:
not null
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/delete/1'
}
-
{
key
:
http.method
,
value
:
DELETE
}
refs
:
-
{
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
4
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
spring-cloud-feign-2.x-scenario
,
traceId
:
not null
}
skipAnalysis
:
'
false'
-
serviceName
:
spring-cloud-feign-2.x-scenario
segmentSize
:
ge
6
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/case/healthCheck'
}
-
{
key
:
http.method
,
value
:
HEAD
}
skipAnalysis
:
'
false'
-
segmentId
:
not
null
spans
:
-
operationName
:
/spring-cloud-feign-2.x-scenario/create/
operationId
:
0
parentSpanId
:
1
spanId
:
2
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
tags
:
-
{
key
:
http.method
,
value
:
POST
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/create/'
}
skipAnalysis
:
'
false'
-
operationName
:
Balancer/spring-cloud-feign-2.x-scenario/create/
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
isError
:
false
spanType
:
Local
peer
:
'
'
tags
:
-
{
key
:
http.method
,
value
:
POST
}
-
{
key
:
url
,
value
:
'
http://spring-cloud-feign-2.x-scenario/spring-cloud-feign-2.x-scenario/create/'
}
skipAnalysis
:
'
false'
-
operationName
:
/spring-cloud-feign-2.x-scenario/get/1
operationId
:
0
parentSpanId
:
3
spanId
:
4
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/get/1'
}
skipAnalysis
:
'
false'
-
operationName
:
Balancer/spring-cloud-feign-2.x-scenario/get/{id}
operationId
:
0
parentSpanId
:
0
spanId
:
3
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
isError
:
false
spanType
:
Local
peer
:
'
'
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
http://spring-cloud-feign-2.x-scenario/spring-cloud-feign-2.x-scenario/get/1'
}
skipAnalysis
:
'
false'
-
operationName
:
/spring-cloud-feign-2.x-scenario/update/1
operationId
:
0
parentSpanId
:
5
spanId
:
6
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
tags
:
-
{
key
:
http.method
,
value
:
PUT
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/update/1'
}
skipAnalysis
:
'
false'
-
operationName
:
Balancer/spring-cloud-feign-2.x-scenario/update/{id}
operationId
:
0
parentSpanId
:
0
spanId
:
5
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
isError
:
false
spanType
:
Local
peer
:
'
'
tags
:
-
{
key
:
http.method
,
value
:
PUT
}
-
{
key
:
url
,
value
:
'
http://spring-cloud-feign-2.x-scenario/spring-cloud-feign-2.x-scenario/update/1'
}
skipAnalysis
:
'
false'
-
operationName
:
/spring-cloud-feign-2.x-scenario/delete/1
operationId
:
0
parentSpanId
:
7
spanId
:
8
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
tags
:
-
{
key
:
http.method
,
value
:
DELETE
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/delete/1'
}
skipAnalysis
:
'
false'
-
operationName
:
Balancer/spring-cloud-feign-2.x-scenario/delete/{id}
operationId
:
0
parentSpanId
:
0
spanId
:
7
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
not
null
isError
:
false
spanType
:
Local
peer
:
'
'
tags
:
-
{
key
:
http.method
,
value
:
DELETE
}
-
{
key
:
url
,
value
:
'
http://spring-cloud-feign-2.x-scenario/spring-cloud-feign-2.x-scenario/delete/1'
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
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
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/create/'
}
-
{
key
:
http.method
,
value
:
POST
}
refs
:
-
{
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
spring-cloud-feign-2.x-scenario
,
traceId
:
not null
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/get/1'
}
-
{
key
:
http.method
,
value
:
GET
}
refs
:
-
{
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
4
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
spring-cloud-feign-2.x-scenario
,
traceId
:
not null
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/update/1'
}
-
{
key
:
http.method
,
value
:
PUT
}
refs
:
-
{
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
6
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
spring-cloud-feign-2.x-scenario
,
traceId
:
not null
}
skipAnalysis
:
'
false'
-
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
isError
:
false
spanType
:
Entry
peer
:
'
'
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/spring-cloud-feign-2.x-scenario/delete/1'
}
-
{
key
:
http.method
,
value
:
DELETE
}
refs
:
-
{
parentEndpoint
:
/spring-cloud-feign-2.x-scenario/case/spring-cloud-feign-2.x-scenario
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
8
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
spring-cloud-feign-2.x-scenario
,
traceId
:
not null
}
skipAnalysis
:
'
false'
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/Application.java
浏览文件 @
63d63ed7
...
...
@@ -18,9 +18,13 @@
package
org.apache.skywalking.apm.testcase.feign
;
import
com.netflix.loadbalancer.DynamicServerListLoadBalancer
;
import
com.netflix.loadbalancer.ILoadBalancer
;
import
com.netflix.loadbalancer.Server
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.Bean
;
@SpringBootApplication
@EnableFeignClients
...
...
@@ -33,4 +37,11 @@ public class Application {
// Never do this
}
}
@Bean
public
ILoadBalancer
loadBalancer
()
{
DynamicServerListLoadBalancer
<
Server
>
serverDynamicServerListLoadBalancer
=
new
DynamicServerListLoadBalancer
<>();
serverDynamicServerListLoadBalancer
.
addServer
(
new
Server
(
"localhost"
,
8080
));
return
serverDynamicServerListLoadBalancer
;
}
}
test/plugin/scenarios/spring-cloud-feign-2.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestRequest.java
浏览文件 @
63d63ed7
...
...
@@ -21,9 +21,14 @@ 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.*
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
@FeignClient
(
value
=
"spring-cloud-feign-2.x-scenario"
,
url
=
"localhost:8080"
,
path
=
"/spring-cloud-feign-2.x-scenario"
)
@FeignClient
(
value
=
"spring-cloud-feign-2.x-scenario"
,
path
=
"/spring-cloud-feign-2.x-scenario"
)
public
interface
RestRequest
{
@GetMapping
(
"/get/{id}"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录