Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
润土的好友猹
SkyWalking
提交
c8fc457e
S
SkyWalking
项目概览
润土的好友猹
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
9
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,发现更多精彩内容 >>
未验证
提交
c8fc457e
编写于
7月 09, 2020
作者:
B
Brandon Fergerson
提交者:
GitHub
7月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Better Vert.x endpoint names (#5064)
上级
20062c68
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
399 addition
and
105 deletion
+399
-105
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteImplHandlerInterceptor.java
...alking/apm/plugin/vertx3/RouteImplHandlerInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteStateInterceptor.java
...e/skywalking/apm/plugin/vertx3/RouteStateInterceptor.java
+26
-0
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ServerConnectionHandleMessageInterceptor.java
...ugin/vertx3/ServerConnectionHandleMessageInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/RouteImplHandlerInstrumentation.java
...plugin/vertx3/define/RouteImplHandlerInstrumentation.java
+4
-4
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/RouteImplInstrumentation.java
...ng/apm/plugin/vertx3/define/RouteImplInstrumentation.java
+3
-3
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/resources/skywalking-plugin.def
...-core-3.x-plugin/src/main/resources/skywalking-plugin.def
+2
-2
test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml
...rios/vertx-eventbus-3.x-scenario/config/expectedData.yaml
+70
-28
test/plugin/scenarios/vertx-web-3.54minus-scenario/config/expectedData.yaml
...ios/vertx-web-3.54minus-scenario/config/expectedData.yaml
+135
-33
test/plugin/scenarios/vertx-web-3.54minus-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxweb/controller/VertxWebController.java
.../apm/testcase/vertxweb/controller/VertxWebController.java
+11
-0
test/plugin/scenarios/vertx-web-3.6plus-scenario/config/expectedData.yaml
...arios/vertx-web-3.6plus-scenario/config/expectedData.yaml
+135
-33
test/plugin/scenarios/vertx-web-3.6plus-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxweb/controller/VertxWebController.java
.../apm/testcase/vertxweb/controller/VertxWebController.java
+11
-0
未找到文件。
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/Route
r
ImplHandlerInterceptor.java
→
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteImplHandlerInterceptor.java
浏览文件 @
c8fc457e
...
...
@@ -26,7 +26,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInt
import
java.lang.reflect.Method
;
import
java.util.Collections
;
public
class
Route
r
ImplHandlerInterceptor
implements
InstanceMethodsAroundInterceptor
{
public
class
RouteImplHandlerInterceptor
implements
InstanceMethodsAroundInterceptor
{
@Override
public
void
beforeMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
...
...
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteStateInterceptor.java
浏览文件 @
c8fc457e
...
...
@@ -34,10 +34,15 @@ import java.lang.reflect.Field;
import
java.lang.reflect.Method
;
import
java.util.List
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
public
class
RouteStateInterceptor
implements
InstanceMethodsAroundInterceptor
,
InstanceConstructorInterceptor
{
private
static
final
Pattern
HTTP_METHOD_PATTERN
=
Pattern
.
compile
(
"methods:\\[([a-zA-Z,]+)\\]"
);
@Override
public
void
onConstruct
(
EnhancedInstance
objInst
,
Object
[]
allArguments
)
{
if
(
allArguments
.
length
>
8
)
{
...
...
@@ -71,6 +76,27 @@ public class RouteStateInterceptor implements InstanceMethodsAroundInterceptor,
Object
connection
=
((
EnhancedInstance
)
routingContext
.
request
()).
getSkyWalkingDynamicField
();
VertxContext
vertxContext
=
(
VertxContext
)
((
EnhancedInstance
)
connection
).
getSkyWalkingDynamicField
();
String
routeMethods
=
null
;
if
(
VertxContext
.
VERTX_VERSION
>=
37.1
)
{
if
(
routingContext
.
currentRoute
().
methods
()
!=
null
)
{
routeMethods
=
"{"
+
routingContext
.
currentRoute
().
methods
()
.
stream
().
map
(
Enum:
:
toString
)
.
collect
(
Collectors
.
joining
(
","
))
+
"}"
;
}
}
else
{
//no methods() method; have to strip from toString()
Matcher
matcher
=
HTTP_METHOD_PATTERN
.
matcher
(
routingContext
.
currentRoute
().
toString
());
if
(
matcher
.
find
())
{
routeMethods
=
"{"
+
matcher
.
group
(
1
)
+
"}"
;
}
}
if
(
routeMethods
!=
null
&&
routingContext
.
currentRoute
().
getPath
()
!=
null
)
{
vertxContext
.
getSpan
().
setOperationName
(
routeMethods
+
routingContext
.
currentRoute
().
getPath
());
}
ContextManager
.
continued
(
vertxContext
.
getContextSnapshot
());
span
.
setComponent
(
ComponentsDefine
.
VERTX
);
SpanLayer
.
asHttp
(
span
);
...
...
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ServerConnectionHandleMessageInterceptor.java
浏览文件 @
c8fc457e
...
...
@@ -47,7 +47,7 @@ public class ServerConnectionHandleMessageInterceptor implements InstanceMethods
request
.
headers
().
remove
(
next
.
getHeadKey
());
}
AbstractSpan
span
=
ContextManager
.
createEntrySpan
(
toPath
(
request
.
getUri
()),
contextCarrier
);
AbstractSpan
span
=
ContextManager
.
createEntrySpan
(
"{"
+
request
.
getMethod
()
+
"}"
+
toPath
(
request
.
getUri
()),
contextCarrier
);
span
.
setComponent
(
ComponentsDefine
.
VERTX
);
SpanLayer
.
asHttp
(
span
);
Tags
.
HTTP
.
METHOD
.
set
(
span
,
request
.
getMethod
().
toString
());
...
...
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/Route
r
ImplHandlerInstrumentation.java
→
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/RouteImplHandlerInstrumentation.java
浏览文件 @
c8fc457e
...
...
@@ -29,17 +29,17 @@ import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
named
;
/**
* {@link Route
r
ImplHandlerInstrumentation} enhance the <code>handler</code> method in
* {@link RouteImplHandlerInstrumentation} enhance the <code>handler</code> method in
* <code>io.vertx.ext.web.impl.RouterImpl</code> class by
* <code>Route
r
ImplHandlerInterceptor</code> class.
* <code>RouteImplHandlerInterceptor</code> class.
*
* Ver. 3.0.0 - 3.4.2
*/
public
class
Route
r
ImplHandlerInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
public
class
RouteImplHandlerInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
private
static
final
String
ENHANCE_CLASS
=
"io.vertx.ext.web.impl.RouteImpl"
;
private
static
final
String
ENHANCE_METHOD
=
"handler"
;
private
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.plugin.vertx3.Route
r
ImplHandlerInterceptor"
;
private
static
final
String
INTERCEPT_CLASS
=
"org.apache.skywalking.apm.plugin.vertx3.RouteImplHandlerInterceptor"
;
@Override
public
ConstructorInterceptPoint
[]
getConstructorsInterceptPoints
()
{
...
...
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/Route
r
ImplInstrumentation.java
→
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/RouteImplInstrumentation.java
浏览文件 @
c8fc457e
...
...
@@ -30,13 +30,13 @@ import static net.bytebuddy.matcher.ElementMatchers.any;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
named
;
/**
* {@link Route
r
ImplInstrumentation} enhance the <code>handleContext</code> method in
* <code>io.vertx.ext.web.impl.Route
r
Impl</code> class by
* {@link RouteImplInstrumentation} enhance the <code>handleContext</code> method in
* <code>io.vertx.ext.web.impl.RouteImpl</code> class by
* <code>RouteStateInterceptor</code> class.
*
* Ver. 3.0.0 - 3.8.2
*/
public
class
Route
r
ImplInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
public
class
RouteImplInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
private
static
final
String
ENHANCE_CLASS
=
"io.vertx.ext.web.impl.RouteImpl"
;
private
static
final
String
ENHANCE_METHOD
=
"handleContext"
;
...
...
apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/resources/skywalking-plugin.def
浏览文件 @
c8fc457e
...
...
@@ -25,8 +25,8 @@ vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.HttpServerResponse
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.RouterContextImplBaseConstructorInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.ServerConnectionHandleMessageInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.RouteStateInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.Route
r
ImplInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.Route
r
ImplHandlerInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.RouteImplInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.RouteImplHandlerInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.RoutingContextWrapperConstructorInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.HttpServerRequestImplConstructorInstrumentation
vertx-core-3.x=org.apache.skywalking.apm.plugin.vertx3.define.HttpServerRequestWrapperConstructorInstrumentation
...
...
test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml
浏览文件 @
c8fc457e
...
...
@@ -19,11 +19,19 @@ segmentItems:
segments
:
-
segmentId
:
not
null
spans
:
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxeventbus.controller.VertxEventbusController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-eventbus-3-scenario/case/healthCheck
-
operationName
:
org.apache.skywalking.apm.testcase.vertxeventbus.controller.VertxEventbusController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{HEAD}/vertx-eventbus-3-scenario/case/healthCheck'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -37,7 +45,7 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
HEAD
}
-
{
key
:
url
,
value
:
/vertx-eventbus-3-scenario/case/healthCheck
}
-
{
key
:
url
,
value
:
'
/vertx-eventbus-3-scenario/case/healthCheck'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
segmentId
:
not
null
spans
:
...
...
@@ -60,12 +68,21 @@ segmentItems:
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
{
operationName
:
local-message-receiver
,
operationId
:
0
,
parentSpanId
:
-1
,
spanId
:
0
,
spanLayer
:
RPCFramework
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
local-message-receiver
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
RPCFramework
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
segmentId
:
not
null
spans
:
-
operationName
:
/vertx-eventbus-3-scenario/case/executeTest
-
operationName
:
'
/vertx-eventbus-3-scenario/case/executeTest'
operationId
:
0
parentSpanId
:
1
spanId
:
2
...
...
@@ -79,13 +96,21 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-eventbus-3-scenario/case/executeTest
}
-
{
key
:
url
,
value
:
'
/vertx-eventbus-3-scenario/case/executeTest'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxeventbus.controller.VertxEventbusController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-eventbus-3-scenario/case/eventbus-case
-
operationName
:
org.apache.skywalking.apm.testcase.vertxeventbus.controller.VertxEventbusController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{GET}/vertx-eventbus-3-scenario/case/eventbus-case'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -99,7 +124,7 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-eventbus-3-scenario/case/eventbus-case
}
-
{
key
:
url
,
value
:
'
/vertx-eventbus-3-scenario/case/eventbus-case'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
segmentId
:
not
null
spans
:
...
...
@@ -116,7 +141,7 @@ segmentItems:
peer
:
'
'
skipAnalysis
:
false
refs
:
-
{
parentEndpoint
:
/vertx-eventbus-3-scenario/case/eventbus-case
,
networkAddress
:
'
'
,
-
{
parentEndpoint
:
'
{GET}/vertx-eventbus-3-scenario/case/eventbus-case'
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-eventbus-3.x-scenario
,
traceId
:
not null
}
...
...
@@ -141,16 +166,33 @@ segmentItems:
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
{
operationName
:
cluster-message-receiver
,
operationId
:
0
,
parentSpanId
:
-1
,
spanId
:
0
,
spanLayer
:
RPCFramework
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Exit
,
peer
:
not null
,
skipAnalysis
:
false
}
-
operationName
:
cluster-message-receiver
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
RPCFramework
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Exit
peer
:
not
null
skipAnalysis
:
false
-
segmentId
:
not
null
spans
:
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxeventbus.controller.VertxEventbusController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-eventbus-3-scenario/case/executeTest
-
operationName
:
org.apache.skywalking.apm.testcase.vertxeventbus.controller.VertxEventbusController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{GET}/vertx-eventbus-3-scenario/case/executeTest'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -164,10 +206,10 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-eventbus-3-scenario/case/executeTest
}
-
{
key
:
url
,
value
:
'
/vertx-eventbus-3-scenario/case/executeTest'
}
-
{
key
:
status_code
,
value
:
'
200'
}
refs
:
-
{
parentEndpoint
:
/vertx-eventbus-3-scenario/case/eventbus-case
,
networkAddress
:
'
localhost:8080'
,
-
{
parentEndpoint
:
'
{GET}/vertx-eventbus-3-scenario/case/eventbus-case'
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-eventbus-3.x-scenario
,
traceId
:
not null
}
test/plugin/scenarios/vertx-web-3.54minus-scenario/config/expectedData.yaml
浏览文件 @
c8fc457e
...
...
@@ -15,15 +15,23 @@
# limitations under the License.
segmentItems
:
-
serviceName
:
vertx-web-3.54minus-scenario
segmentSize
:
7
segmentSize
:
9
segments
:
-
segmentId
:
not
null
spans
:
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-web-3_54minus-scenario/case/healthCheck
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{HEAD}/vertx-web-3_54minus-scenario/case/healthCheck'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -37,11 +45,11 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
HEAD
}
-
{
key
:
url
,
value
:
/vertx-web-3_54minus-scenario/case/healthCheck
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_54minus-scenario/case/healthCheck'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/vertx-web-3_54minus-scenario/case/healthCheck
-
operationName
:
'
/vertx-web-3_54minus-scenario/dynamicEndpoint/100'
operationId
:
0
parentSpanId
:
1
spanId
:
2
...
...
@@ -53,15 +61,39 @@ segmentItems:
spanType
:
Exit
peer
:
localhost:8080
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_54minus-scenario/dynamicEndpoint/100'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
operationName
:
'
/vertx-web-3_54minus-scenario/case/healthCheck'
operationId
:
0
parentSpanId
:
1
spanId
:
3
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
HEAD
}
-
{
key
:
url
,
value
:
/vertx-web-3_54minus-scenario/case/healthCheck
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_54minus-scenario/case/healthCheck'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-web-3_54minus-scenario/case/web-case
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{GET}/vertx-web-3_54minus-scenario/case/web-case'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -75,15 +107,23 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-web-3_54minus-scenario/case/web-case
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_54minus-scenario/case/web-case'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
segmentId
:
not
null
spans
:
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-web-3_54minus-scenario/case/healthCheck
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{HEAD}/vertx-web-3_54minus-scenario/case/healthCheck'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -97,20 +137,63 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
HEAD
}
-
{
key
:
url
,
value
:
/vertx-web-3_54minus-scenario/case/healthCheck
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_54minus-scenario/case/healthCheck'
}
-
{
key
:
status_code
,
value
:
'
200'
}
refs
:
-
{
parentEndpoint
:
/vertx-web-3_54minus-scenario/case/web-case
,
networkAddress
:
'
localhost:8080'
,
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_54minus-scenario/case/web-case'
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
3
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.54minus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{GET}/vertx-web-3_54minus-scenario/dynamicEndpoint/:id'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Entry
peer
:
'
'
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_54minus-scenario/dynamicEndpoint/100'
}
-
{
key
:
status_code
,
value
:
'
200'
}
refs
:
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_54minus-scenario/case/web-case'
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.54minus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
{
operationName
:
io.vertx.ext.web.handler.impl.BodyHandlerImpl.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler
-
operationName
:
io.vertx.ext.web.handler.impl.BodyHandlerImpl.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{GET}/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -124,13 +207,32 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler'
}
-
{
key
:
status_code
,
value
:
'
200'
}
refs
:
-
{
parentEndpoint
:
'
#/vertx-web-3_54minus-scenario/case/healthCheck'
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
1
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.54minus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
operationName
:
'
#/vertx-web-3_54minus-scenario/dynamicEndpoint/100'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
refs
:
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_54minus-scenario/case/web-case'
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.54minus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
...
...
@@ -146,13 +248,13 @@ segmentItems:
peer
:
'
'
skipAnalysis
:
false
refs
:
-
{
parentEndpoint
:
/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler
,
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler'
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
0
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.54minus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler
-
operationName
:
'
/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler'
operationId
:
0
parentSpanId
:
0
spanId
:
1
...
...
@@ -166,7 +268,7 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
operationName
:
'
#/vertx-web-3_54minus-scenario/case/healthCheck'
operationId
:
0
...
...
@@ -181,8 +283,8 @@ segmentItems:
peer
:
'
'
skipAnalysis
:
false
refs
:
-
{
parentEndpoint
:
/vertx-web-3_54minus-scenario/case/web-case
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_54minus-scenario/case/web-case'
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
3
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.54minus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
...
...
test/plugin/scenarios/vertx-web-3.54minus-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxweb/controller/VertxWebController.java
浏览文件 @
c8fc457e
...
...
@@ -28,6 +28,7 @@ public class VertxWebController extends AbstractVerticle {
public
void
start
()
{
Router
router
=
Router
.
router
(
vertx
);
router
.
get
(
"/vertx-web-3_54minus-scenario/case/web-case"
).
handler
(
this
::
handleWebCase
);
router
.
get
(
"/vertx-web-3_54minus-scenario/dynamicEndpoint/:id"
).
handler
(
this
::
dynamicEndpoint
);
router
.
route
(
"/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler"
).
handler
(
BodyHandler
.
create
());
router
.
get
(
"/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler"
).
handler
(
this
::
withBodyHandler
);
router
.
head
(
"/vertx-web-3_54minus-scenario/case/healthCheck"
).
handler
(
this
::
healthCheck
);
...
...
@@ -35,6 +36,12 @@ public class VertxWebController extends AbstractVerticle {
}
private
void
handleWebCase
(
RoutingContext
routingContext
)
{
//dynamic endpoint test
vertx
.
createHttpClient
().
getNow
(
8080
,
"localhost"
,
"/vertx-web-3_54minus-scenario/dynamicEndpoint/100"
,
it
->
{
});
//non-body and body handler test
vertx
.
createHttpClient
().
headNow
(
8080
,
"localhost"
,
"/vertx-web-3_54minus-scenario/case/healthCheck"
,
healthCheck
->
{
vertx
.
createHttpClient
().
getNow
(
8080
,
"localhost"
,
...
...
@@ -43,6 +50,10 @@ public class VertxWebController extends AbstractVerticle {
});
}
private
void
dynamicEndpoint
(
RoutingContext
routingContext
)
{
routingContext
.
response
().
setStatusCode
(
200
).
end
(
"Success"
);
}
private
void
withBodyHandler
(
RoutingContext
routingContext
)
{
routingContext
.
response
().
setStatusCode
(
200
).
end
(
"Success"
);
}
...
...
test/plugin/scenarios/vertx-web-3.6plus-scenario/config/expectedData.yaml
浏览文件 @
c8fc457e
...
...
@@ -15,15 +15,23 @@
# limitations under the License.
segmentItems
:
-
serviceName
:
vertx-web-3.6plus-scenario
segmentSize
:
7
segmentSize
:
9
segments
:
-
segmentId
:
not
null
spans
:
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-web-3_6plus-scenario/case/healthCheck
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{HEAD}/vertx-web-3_6plus-scenario/case/healthCheck'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -37,11 +45,11 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
HEAD
}
-
{
key
:
url
,
value
:
/vertx-web-3_6plus-scenario/case/healthCheck
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_6plus-scenario/case/healthCheck'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/vertx-web-3_6plus-scenario/case/healthCheck
-
operationName
:
'
/vertx-web-3_6plus-scenario/dynamicEndpoint/100'
operationId
:
0
parentSpanId
:
1
spanId
:
2
...
...
@@ -53,15 +61,39 @@ segmentItems:
spanType
:
Exit
peer
:
localhost:8080
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_6plus-scenario/dynamicEndpoint/100'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
operationName
:
'
/vertx-web-3_6plus-scenario/case/healthCheck'
operationId
:
0
parentSpanId
:
1
spanId
:
3
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
HEAD
}
-
{
key
:
url
,
value
:
/vertx-web-3_6plus-scenario/case/healthCheck
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_6plus-scenario/case/healthCheck'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-web-3_6plus-scenario/case/web-case
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{GET}/vertx-web-3_6plus-scenario/case/web-case'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -75,15 +107,23 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-web-3_6plus-scenario/case/web-case
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_6plus-scenario/case/web-case'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
segmentId
:
not
null
spans
:
-
{
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-web-3_6plus-scenario/case/healthCheck
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{HEAD}/vertx-web-3_6plus-scenario/case/healthCheck'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -97,20 +137,63 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
HEAD
}
-
{
key
:
url
,
value
:
/vertx-web-3_6plus-scenario/case/healthCheck
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_6plus-scenario/case/healthCheck'
}
-
{
key
:
status_code
,
value
:
'
200'
}
refs
:
-
{
parentEndpoint
:
/vertx-web-3_6plus-scenario/case/web-case
,
networkAddress
:
'
localhost:8080'
,
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_6plus-scenario/case/web-case'
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
3
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.6plus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{GET}/vertx-web-3_6plus-scenario/dynamicEndpoint/:id'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Entry
peer
:
'
'
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_6plus-scenario/dynamicEndpoint/100'
}
-
{
key
:
status_code
,
value
:
'
200'
}
refs
:
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_6plus-scenario/case/web-case'
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.6plus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
{
operationName
:
io.vertx.ext.web.handler.impl.BodyHandlerImpl.handle(RoutingContext)
,
operationId
:
0
,
parentSpanId
:
0
,
spanId
:
1
,
spanLayer
:
Http
,
startTime
:
nq 0
,
endTime
:
nq 0
,
componentId
:
59
,
isError
:
false
,
spanType
:
Local
,
peer
:
'
'
,
skipAnalysis
:
false
}
-
operationName
:
/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler
-
operationName
:
io.vertx.ext.web.handler.impl.BodyHandlerImpl.handle(RoutingContext)
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
-
operationName
:
'
{GET}/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
...
...
@@ -124,13 +207,32 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler'
}
-
{
key
:
status_code
,
value
:
'
200'
}
refs
:
-
{
parentEndpoint
:
'
#/vertx-web-3_6plus-scenario/case/healthCheck'
,
networkAddress
:
'
localhost:8080'
,
refType
:
CrossProcess
,
parentSpanId
:
1
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.6plus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
operationName
:
'
#/vertx-web-3_6plus-scenario/dynamicEndpoint/100'
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
59
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
refs
:
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_6plus-scenario/case/web-case'
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.6plus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
operationName
:
org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
...
...
@@ -146,13 +248,13 @@ segmentItems:
peer
:
'
'
skipAnalysis
:
false
refs
:
-
{
parentEndpoint
:
/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler
,
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler'
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
0
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.6plus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler
-
operationName
:
'
/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler'
operationId
:
0
parentSpanId
:
0
spanId
:
1
...
...
@@ -166,7 +268,7 @@ segmentItems:
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler
}
-
{
key
:
url
,
value
:
'
/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler'
}
-
{
key
:
status_code
,
value
:
'
200'
}
-
operationName
:
'
#/vertx-web-3_6plus-scenario/case/healthCheck'
operationId
:
0
...
...
@@ -181,8 +283,8 @@ segmentItems:
peer
:
'
'
skipAnalysis
:
false
refs
:
-
{
parentEndpoint
:
/vertx-web-3_6plus-scenario/case/web-case
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
2
,
parentTraceSegmentId
:
not null
,
-
{
parentEndpoint
:
'
{GET}/vertx-web-3_6plus-scenario/case/web-case'
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
3
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
vertx-web-3.6plus-scenario
,
traceId
:
not null
}
-
segmentId
:
not
null
...
...
test/plugin/scenarios/vertx-web-3.6plus-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxweb/controller/VertxWebController.java
浏览文件 @
c8fc457e
...
...
@@ -29,6 +29,7 @@ public class VertxWebController extends AbstractVerticle {
public
void
start
()
{
Router
router
=
Router
.
router
(
vertx
);
router
.
get
(
"/vertx-web-3_6plus-scenario/case/web-case"
).
handler
(
this
::
handleWebCase
);
router
.
get
(
"/vertx-web-3_6plus-scenario/dynamicEndpoint/:id"
).
handler
(
this
::
dynamicEndpoint
);
router
.
get
(
"/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler"
)
.
handler
(
BodyHandler
.
create
()).
handler
(
this
::
withBodyHandler
);
router
.
head
(
"/vertx-web-3_6plus-scenario/case/healthCheck"
).
handler
(
this
::
healthCheck
);
...
...
@@ -36,6 +37,12 @@ public class VertxWebController extends AbstractVerticle {
}
private
void
handleWebCase
(
RoutingContext
routingContext
)
{
//dynamic endpoint test
WebClient
.
create
(
vertx
).
get
(
8080
,
"localhost"
,
"/vertx-web-3_6plus-scenario/dynamicEndpoint/100"
).
send
(
it
->
{
});
//non-body and body handler test
WebClient
.
create
(
vertx
).
head
(
8080
,
"localhost"
,
"/vertx-web-3_6plus-scenario/case/healthCheck"
)
.
send
(
healthCheck
->
{
if
(
healthCheck
.
succeeded
())
{
...
...
@@ -48,6 +55,10 @@ public class VertxWebController extends AbstractVerticle {
});
}
private
void
dynamicEndpoint
(
RoutingContext
routingContext
)
{
routingContext
.
response
().
setStatusCode
(
200
).
end
(
"Success"
);
}
private
void
withBodyHandler
(
RoutingContext
routingContext
)
{
routingContext
.
response
().
setStatusCode
(
200
).
end
(
"Success"
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录