Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
javalover123888
SkyWalking
提交
57b69fb8
S
SkyWalking
项目概览
javalover123888
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / SkyWalking
通知
2
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,发现更多精彩内容 >>
提交
57b69fb8
编写于
7月 19, 2017
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support #299 and #301
上级
7a91ef7a
变更
13
显示空白变更内容
内联
并排
Showing
13 changed file
with
128 addition
and
53 deletion
+128
-53
apm-network/src/main/proto/TraceSegmentService.proto
apm-network/src/main/proto/TraceSegmentService.proto
+2
-0
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextCarrier.java
...org/skywalking/apm/agent/core/context/ContextCarrier.java
+22
-5
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextSnapshot.java
...rg/skywalking/apm/agent/core/context/ContextSnapshot.java
+27
-9
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/IgnoredTracerContext.java
...ywalking/apm/agent/core/context/IgnoredTracerContext.java
+1
-1
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/TracingContext.java
...org/skywalking/apm/agent/core/context/TracingContext.java
+31
-11
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java
...walking/apm/agent/core/context/trace/TraceSegmentRef.java
+34
-13
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/ContextManagerTest.java
...skywalking/apm/agent/core/context/ContextManagerTest.java
+4
-7
apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/test/java/org/skywalking/apm/plugin/dubbo/DubboInterceptorTest.java
...org/skywalking/apm/plugin/dubbo/DubboInterceptorTest.java
+2
-2
apm-sniffer/apm-sdk-plugin/motan-plugin/src/test/java/org/skywalking/apm/plugin/motan/MotanProviderInterceptorTest.java
...alking/apm/plugin/motan/MotanProviderInterceptorTest.java
+1
-1
apm-sniffer/apm-sdk-plugin/resin-3.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v3/ResinV3InterceptorTest.java
...kywalking/apm/plugin/resin/v3/ResinV3InterceptorTest.java
+1
-1
apm-sniffer/apm-sdk-plugin/resin-4.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v4/ResinV4InterceptorTest.java
...kywalking/apm/plugin/resin/v4/ResinV4InterceptorTest.java
+1
-1
apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/test/java/org/skywalking/apm/plugin/tomcat78x/TomcatInterceptorTest.java
...kywalking/apm/plugin/tomcat78x/TomcatInterceptorTest.java
+1
-1
apm-sniffer/apm-toolkit-activation/apm-toolkit-opentracing-activation/src/test/java/org/skywalking/apm/toolkit/activation/opentracing/SkywalkingSpanActivationTest.java
.../activation/opentracing/SkywalkingSpanActivationTest.java
+1
-1
未找到文件。
apm-network/src/main/proto/TraceSegmentService.proto
浏览文件 @
57b69fb8
...
...
@@ -33,6 +33,8 @@ message TraceSegmentReference {
int32
networkAddressId
=
6
;
string
entryServiceName
=
7
;
int32
entryServiceId
=
8
;
string
parentServiceName
=
9
;
int32
parentServiceId
=
10
;
}
message
SpanObject
{
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextCarrier.java
浏览文件 @
57b69fb8
...
...
@@ -28,6 +28,8 @@ public class ContextCarrier implements Serializable {
private
String
entryOperationName
;
private
String
parentOperationName
;
/**
* {@link DistributedTraceId}
*/
...
...
@@ -47,7 +49,8 @@ public class ContextCarrier implements Serializable {
this
.
getApplicationInstanceId
()
+
""
,
this
.
getPeerHost
(),
this
.
getEntryOperationName
(),
this
.
serializeDistributedTraceId
());
this
.
getParentOperationName
(),
this
.
getPrimaryDistributedTraceId
());
}
else
{
return
""
;
}
...
...
@@ -60,15 +63,16 @@ public class ContextCarrier implements Serializable {
*/
public
ContextCarrier
deserialize
(
String
text
)
{
if
(
text
!=
null
)
{
String
[]
parts
=
text
.
split
(
"\\|"
,
6
);
if
(
parts
.
length
==
6
)
{
String
[]
parts
=
text
.
split
(
"\\|"
,
7
);
if
(
parts
.
length
==
7
)
{
try
{
this
.
traceSegmentId
=
parts
[
0
];
this
.
spanId
=
Integer
.
parseInt
(
parts
[
1
]);
this
.
applicationInstanceId
=
Integer
.
parseInt
(
parts
[
2
]);
this
.
peerHost
=
parts
[
3
];
this
.
entryOperationName
=
parts
[
4
];
this
.
primaryDistributedTraceId
=
new
PropagatedTraceId
(
parts
[
5
]);
this
.
parentOperationName
=
parts
[
5
];
this
.
primaryDistributedTraceId
=
new
PropagatedTraceId
(
parts
[
6
]);
}
catch
(
NumberFormatException
e
)
{
}
...
...
@@ -88,6 +92,7 @@ public class ContextCarrier implements Serializable {
&&
applicationInstanceId
!=
DictionaryUtil
.
nullValue
()
&&
!
StringUtil
.
isEmpty
(
peerHost
)
&&
!
StringUtil
.
isEmpty
(
entryOperationName
)
&&
!
StringUtil
.
isEmpty
(
parentOperationName
)
&&
primaryDistributedTraceId
!=
null
;
}
...
...
@@ -103,6 +108,14 @@ public class ContextCarrier implements Serializable {
this
.
entryOperationName
=
entryOperationId
+
""
;
}
void
setParentOperationName
(
String
parentOperationName
)
{
this
.
parentOperationName
=
'#'
+
parentOperationName
;
}
void
setParentOperationId
(
int
parentOperationId
)
{
this
.
parentOperationName
=
parentOperationId
+
""
;
}
public
String
getTraceSegmentId
()
{
return
traceSegmentId
;
}
...
...
@@ -147,7 +160,11 @@ public class ContextCarrier implements Serializable {
this
.
primaryDistributedTraceId
=
distributedTraceIds
.
get
(
0
);
}
private
String
serialize
DistributedTraceId
()
{
private
String
getPrimary
DistributedTraceId
()
{
return
primaryDistributedTraceId
.
toString
();
}
public
String
getParentOperationName
()
{
return
parentOperationName
;
}
}
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextSnapshot.java
浏览文件 @
57b69fb8
...
...
@@ -2,7 +2,6 @@ package org.skywalking.apm.agent.core.context;
import
java.util.List
;
import
org.skywalking.apm.agent.core.context.ids.DistributedTraceId
;
import
org.skywalking.apm.agent.core.dictionary.DictionaryUtil
;
import
org.skywalking.apm.util.StringUtil
;
/**
...
...
@@ -24,22 +23,36 @@ public class ContextSnapshot {
private
String
entryOperationName
;
private
String
parentOperationName
;
/**
* {@link DistributedTraceId}
*/
private
DistributedTraceId
primaryDistributedTraceId
;
ContextSnapshot
(
String
traceSegmentId
,
int
spanId
,
List
<
DistributedTraceId
>
distributedTraceIds
,
int
entryServiceId
,
String
entryOperationName
)
{
List
<
DistributedTraceId
>
distributedTraceIds
)
{
this
.
traceSegmentId
=
traceSegmentId
;
this
.
spanId
=
spanId
;
if
(
distributedTraceIds
!=
null
)
{
this
.
primaryDistributedTraceId
=
distributedTraceIds
.
get
(
0
);
}
}
if
(
entryServiceId
==
DictionaryUtil
.
nullValue
()
)
{
public
void
setEntryOperationName
(
String
entryOperationName
)
{
this
.
entryOperationName
=
"#"
+
entryOperationName
;
}
else
{
this
.
entryOperationName
=
String
.
valueOf
(
entryServiceId
);
}
public
void
setEntryOperationId
(
int
entryOperationId
)
{
this
.
entryOperationName
=
entryOperationId
+
""
;
}
public
void
setParentOperationName
(
String
parentOperationName
)
{
this
.
parentOperationName
=
"#"
+
parentOperationName
;
}
public
void
setParentOperationId
(
int
parentOperationId
)
{
this
.
parentOperationName
=
parentOperationId
+
""
;
}
public
DistributedTraceId
getDistributedTraceId
()
{
...
...
@@ -54,11 +67,16 @@ public class ContextSnapshot {
return
spanId
;
}
public
String
getParentOperationName
()
{
return
parentOperationName
;
}
public
boolean
isValid
()
{
return
traceSegmentId
!=
null
&&
spanId
>
-
1
&&
primaryDistributedTraceId
!=
null
&&
!
StringUtil
.
isEmpty
(
entryOperationName
);
&&
!
StringUtil
.
isEmpty
(
entryOperationName
)
&&
!
StringUtil
.
isEmpty
(
parentOperationName
);
}
public
String
getEntryOperationName
()
{
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/IgnoredTracerContext.java
浏览文件 @
57b69fb8
...
...
@@ -33,7 +33,7 @@ public class IgnoredTracerContext implements AbstractTracerContext {
}
@Override
public
ContextSnapshot
capture
()
{
return
new
ContextSnapshot
(
null
,
-
1
,
null
,
0
,
null
);
return
new
ContextSnapshot
(
null
,
-
1
,
null
);
}
@Override
public
void
continued
(
ContextSnapshot
snapshot
)
{
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/TracingContext.java
浏览文件 @
57b69fb8
...
...
@@ -96,8 +96,8 @@ public class TracingContext implements AbstractTracerContext {
String
operationName
;
if
(
refs
!=
null
&&
refs
.
size
()
>
0
)
{
TraceSegmentRef
ref
=
refs
.
get
(
0
);
operationId
=
ref
.
getOperationId
();
operationName
=
ref
.
getOperationName
();
operationId
=
ref
.
get
Entry
OperationId
();
operationName
=
ref
.
get
Entry
OperationName
();
}
else
{
AbstractTracingSpan
firstSpan
=
first
();
operationId
=
firstSpan
.
getOperationId
();
...
...
@@ -109,6 +109,13 @@ public class TracingContext implements AbstractTracerContext {
carrier
.
setEntryOperationId
(
operationId
);
}
int
parentOperationId
=
first
().
getOperationId
();
if
(
parentOperationId
==
DictionaryUtil
.
nullValue
())
{
carrier
.
setParentOperationName
(
first
().
getOperationName
());
}
else
{
carrier
.
setParentOperationId
(
parentOperationId
);
}
carrier
.
setDistributedTraceIds
(
this
.
segment
.
getRelatedGlobalTraces
());
}
...
...
@@ -133,19 +140,32 @@ public class TracingContext implements AbstractTracerContext {
@Override
public
ContextSnapshot
capture
()
{
List
<
TraceSegmentRef
>
refs
=
this
.
segment
.
getRefs
();
ContextSnapshot
snapshot
=
new
ContextSnapshot
(
segment
.
getTraceSegmentId
(),
activeSpan
().
getSpanId
(),
segment
.
getRelatedGlobalTraces
());
int
entryOperationId
;
String
entryOperationName
;
AbstractTracingSpan
firstSpan
=
first
();
if
(
refs
!=
null
&&
refs
.
size
()
>
0
)
{
TraceSegmentRef
ref
=
refs
.
get
(
0
);
return
new
ContextSnapshot
(
segment
.
getTraceSegmentId
(),
activeSpan
().
getSpanId
(),
segment
.
getRelatedGlobalTraces
(),
ref
.
getOperationId
(),
ref
.
getOperationName
()
);
entryOperationId
=
ref
.
getEntryOperationId
();
entryOperationName
=
ref
.
getEntryOperationName
();
}
else
{
AbstractTracingSpan
firstSpan
=
first
();
return
new
ContextSnapshot
(
segment
.
getTraceSegmentId
(),
activeSpan
().
getSpanId
(),
segment
.
getRelatedGlobalTraces
(),
firstSpan
.
getOperationId
(),
firstSpan
.
getOperationName
()
);
entryOperationId
=
firstSpan
.
getOperationId
();
entryOperationName
=
firstSpan
.
getOperationName
();
}
if
(
entryOperationId
==
DictionaryUtil
.
nullValue
())
{
snapshot
.
setEntryOperationName
(
entryOperationName
);
}
else
{
snapshot
.
setEntryOperationId
(
entryOperationId
);
}
if
(
firstSpan
.
getOperationId
()
==
DictionaryUtil
.
nullValue
())
{
snapshot
.
setParentOperationName
(
firstSpan
.
getOperationName
());
}
else
{
snapshot
.
setParentOperationId
(
firstSpan
.
getOperationId
());
}
return
snapshot
;
}
/**
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java
浏览文件 @
57b69fb8
...
...
@@ -25,9 +25,13 @@ public class TraceSegmentRef {
private
int
peerId
=
DictionaryUtil
.
nullValue
();
private
String
o
perationName
;
private
String
entryO
perationName
;
private
int
operationId
=
DictionaryUtil
.
nullValue
();
private
int
entryOperationId
=
DictionaryUtil
.
nullValue
();
private
String
parentOperationName
;
private
int
parentOperationId
=
DictionaryUtil
.
nullValue
();
/**
* Transform a {@link ContextCarrier} to the <code>TraceSegmentRef</code>
...
...
@@ -47,9 +51,15 @@ public class TraceSegmentRef {
}
String
entryOperationName
=
carrier
.
getEntryOperationName
();
if
(
entryOperationName
.
charAt
(
0
)
==
'#'
)
{
this
.
operationName
=
entryOperationName
.
substring
(
1
);
this
.
entryOperationName
=
entryOperationName
.
substring
(
1
);
}
else
{
this
.
entryOperationId
=
Integer
.
parseInt
(
entryOperationName
);
}
String
parentOperationName
=
carrier
.
getParentOperationName
();
if
(
parentOperationName
.
charAt
(
0
)
==
'#'
)
{
this
.
parentOperationName
=
parentOperationName
.
substring
(
1
);
}
else
{
this
.
operationId
=
Integer
.
parseInt
(
entry
OperationName
);
this
.
parentOperationId
=
Integer
.
parseInt
(
parent
OperationName
);
}
}
...
...
@@ -59,18 +69,24 @@ public class TraceSegmentRef {
this
.
spanId
=
snapshot
.
getSpanId
();
String
entryOperationName
=
snapshot
.
getEntryOperationName
();
if
(
entryOperationName
.
charAt
(
0
)
==
'#'
)
{
this
.
o
perationName
=
entryOperationName
.
substring
(
1
);
this
.
entryO
perationName
=
entryOperationName
.
substring
(
1
);
}
else
{
this
.
operationId
=
Integer
.
parseInt
(
entryOperationName
);
this
.
entryOperationId
=
Integer
.
parseInt
(
entryOperationName
);
}
String
parentOperationName
=
snapshot
.
getParentOperationName
();
if
(
parentOperationName
.
charAt
(
0
)
==
'#'
)
{
this
.
parentOperationName
=
parentOperationName
.
substring
(
1
);
}
else
{
this
.
parentOperationId
=
Integer
.
parseInt
(
parentOperationName
);
}
}
public
String
getOperationName
()
{
return
o
perationName
;
public
String
get
Entry
OperationName
()
{
return
entryO
perationName
;
}
public
int
getOperationId
()
{
return
o
perationId
;
public
int
get
Entry
OperationId
()
{
return
entryO
perationId
;
}
public
TraceSegmentReference
transform
()
{
...
...
@@ -89,10 +105,15 @@ public class TraceSegmentRef {
refBuilder
.
setParentTraceSegmentId
(
traceSegmentId
);
refBuilder
.
setParentSpanId
(
spanId
);
if
(
operationId
==
DictionaryUtil
.
nullValue
())
{
refBuilder
.
setEntryServiceName
(
operationName
);
if
(
entryOperationId
==
DictionaryUtil
.
nullValue
())
{
refBuilder
.
setEntryServiceName
(
entryOperationName
);
}
else
{
refBuilder
.
setEntryServiceId
(
entryOperationId
);
}
if
(
parentOperationId
==
DictionaryUtil
.
nullValue
())
{
refBuilder
.
setParentServiceName
(
parentOperationName
);
}
else
{
refBuilder
.
set
EntryServiceId
(
o
perationId
);
refBuilder
.
set
ParentServiceId
(
parentO
perationId
);
}
return
refBuilder
.
build
();
}
...
...
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/ContextManagerTest.java
浏览文件 @
57b69fb8
package
org.skywalking.apm.agent.core.context
;
import
com.google.instrumentation.trace.Span
;
import
com.google.protobuf.InvalidProtocolBufferException
;
import
java.util.List
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.BeforeClass
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.skywalking.apm.agent.core.boot.ServiceManager
;
import
org.skywalking.apm.agent.core.conf.RemoteDownstreamConfig
;
import
org.skywalking.apm.agent.core.context.tag.Tags
;
import
org.skywalking.apm.agent.core.context.trace.AbstractSpan
;
...
...
@@ -82,7 +79,7 @@ public class ContextManagerTest {
@Test
public
void
createMultipleEntrySpan
()
{
ContextCarrier
contextCarrier
=
new
ContextCarrier
().
deserialize
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|T.1499176688386.581928182.80935.69.2"
);
ContextCarrier
contextCarrier
=
new
ContextCarrier
().
deserialize
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|
#/portal/|
T.1499176688386.581928182.80935.69.2"
);
assertTrue
(
contextCarrier
.
isValid
());
AbstractSpan
firstEntrySpan
=
ContextManager
.
createEntrySpan
(
"/testFirstEntry"
,
contextCarrier
);
...
...
@@ -115,8 +112,8 @@ public class ContextManagerTest {
TraceSegmentRef
ref
=
actualSegment
.
getRefs
().
get
(
0
);
assertThat
(
TraceSegmentRefHelper
.
getPeerHost
(
ref
),
is
(
"192.168.1.8 :18002"
));
assertThat
(
ref
.
getOperationName
(),
is
(
"/portal/"
));
assertThat
(
ref
.
getOperationId
(),
is
(
0
));
assertThat
(
ref
.
get
Entry
OperationName
(),
is
(
"/portal/"
));
assertThat
(
ref
.
get
Entry
OperationId
(),
is
(
0
));
List
<
AbstractTracingSpan
>
spanList
=
SegmentHelper
.
getSpan
(
actualSegment
);
assertThat
(
spanList
.
size
(),
is
(
2
));
...
...
@@ -205,7 +202,7 @@ public class ContextManagerTest {
@Test
public
void
testTransform
()
throws
InvalidProtocolBufferException
{
ContextCarrier
contextCarrier
=
new
ContextCarrier
().
deserialize
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|T.1499176688386.581928182.80935.69.2"
);
ContextCarrier
contextCarrier
=
new
ContextCarrier
().
deserialize
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|
#/portal/|
T.1499176688386.581928182.80935.69.2"
);
assertTrue
(
contextCarrier
.
isValid
());
AbstractSpan
firstEntrySpan
=
ContextManager
.
createEntrySpan
(
"/testFirstEntry"
,
contextCarrier
);
...
...
apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/test/java/org/skywalking/apm/plugin/dubbo/DubboInterceptorTest.java
浏览文件 @
57b69fb8
...
...
@@ -148,7 +148,7 @@ public class DubboInterceptorTest {
@Test
public
void
testProviderWithAttachment
()
throws
Throwable
{
when
(
rpcContext
.
isConsumerSide
()).
thenReturn
(
false
);
when
(
rpcContext
.
getAttachment
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
)).
thenReturn
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|T.1499176688386.581928182.80935.69.2"
);
when
(
rpcContext
.
getAttachment
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
)).
thenReturn
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|
#/portal/|
T.1499176688386.581928182.80935.69.2"
);
dubboInterceptor
.
beforeMethod
(
enhancedInstance
,
"invoke"
,
allArguments
,
argumentTypes
,
methodInterceptResult
);
dubboInterceptor
.
afterMethod
(
enhancedInstance
,
"invoke"
,
allArguments
,
argumentTypes
,
result
);
...
...
@@ -160,7 +160,7 @@ public class DubboInterceptorTest {
when
(
rpcContext
.
isConsumerSide
()).
thenReturn
(
false
);
FieldSetter
.
setStaticValue
(
BugFixActive
.
class
,
"ACTIVE"
,
true
);
testParam
.
setTraceContext
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|T.1499176688386.581928182.80935.69.2"
);
testParam
.
setTraceContext
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|
#/portal/|
T.1499176688386.581928182.80935.69.2"
);
dubboInterceptor
.
beforeMethod
(
enhancedInstance
,
"invoke"
,
allArguments
,
argumentTypes
,
methodInterceptResult
);
dubboInterceptor
.
afterMethod
(
enhancedInstance
,
"invoke"
,
allArguments
,
argumentTypes
,
result
);
...
...
apm-sniffer/apm-sdk-plugin/motan-plugin/src/test/java/org/skywalking/apm/plugin/motan/MotanProviderInterceptorTest.java
浏览文件 @
57b69fb8
...
...
@@ -91,7 +91,7 @@ public class MotanProviderInterceptorTest {
@Test
public
void
testInvokerWithRefSegment
()
throws
Throwable
{
HashMap
attachments
=
new
HashMap
();
attachments
.
put
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
,
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|T.1499176688386.581928182.80935.69.2"
);
attachments
.
put
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
,
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|
#/portal/|
T.1499176688386.581928182.80935.69.2"
);
when
(
request
.
getAttachments
()).
thenReturn
(
attachments
);
invokeInterceptor
.
beforeMethod
(
enhancedInstance
,
"execute"
,
arguments
,
argumentType
,
null
);
...
...
apm-sniffer/apm-sdk-plugin/resin-3.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v3/ResinV3InterceptorTest.java
浏览文件 @
57b69fb8
...
...
@@ -90,7 +90,7 @@ public class ResinV3InterceptorTest {
@Test
public
void
testWithSerializedContextData
()
throws
Throwable
{
when
(
request
.
getHeader
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
)).
thenReturn
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|T.1499176688386.581928182.80935.69.2"
);
when
(
request
.
getHeader
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
)).
thenReturn
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|
#/portal/|
T.1499176688386.581928182.80935.69.2"
);
interceptor
.
beforeMethod
(
enhancedInstance
,
"service"
,
arguments
,
argumentType
,
methodInterceptResult
);
interceptor
.
afterMethod
(
enhancedInstance
,
"service"
,
arguments
,
argumentType
,
null
);
...
...
apm-sniffer/apm-sdk-plugin/resin-4.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v4/ResinV4InterceptorTest.java
浏览文件 @
57b69fb8
...
...
@@ -92,7 +92,7 @@ public class ResinV4InterceptorTest {
@Test
public
void
testWithSerializedContextData
()
throws
Throwable
{
when
(
request
.
getHeader
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
)).
thenReturn
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|T.1499176688386.581928182.80935.69.2"
);
when
(
request
.
getHeader
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
)).
thenReturn
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|
#/portal/|
T.1499176688386.581928182.80935.69.2"
);
interceptor
.
beforeMethod
(
enhancedInstance
,
"service"
,
arguments
,
argumentType
,
methodInterceptResult
);
interceptor
.
afterMethod
(
enhancedInstance
,
"service"
,
arguments
,
argumentType
,
null
);
...
...
apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/test/java/org/skywalking/apm/plugin/tomcat78x/TomcatInterceptorTest.java
浏览文件 @
57b69fb8
...
...
@@ -82,7 +82,7 @@ public class TomcatInterceptorTest {
@Test
public
void
testWithSerializedContextData
()
throws
Throwable
{
when
(
request
.
getHeader
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
)).
thenReturn
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|T.1499176688386.581928182.80935.69.2"
);
when
(
request
.
getHeader
(
Config
.
Plugin
.
Propagation
.
HEADER_NAME
)).
thenReturn
(
"S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|
#/portal/|
T.1499176688386.581928182.80935.69.2"
);
tomcatInterceptor
.
beforeMethod
(
enhancedInstance
,
"invoke"
,
arguments
,
argumentType
,
methodInterceptResult
);
tomcatInterceptor
.
afterMethod
(
enhancedInstance
,
"invoke"
,
arguments
,
argumentType
,
null
);
...
...
apm-sniffer/apm-toolkit-activation/apm-toolkit-opentracing-activation/src/test/java/org/skywalking/apm/toolkit/activation/opentracing/SkywalkingSpanActivationTest.java
浏览文件 @
57b69fb8
...
...
@@ -181,7 +181,7 @@ public class SkywalkingSpanActivationTest {
.
withTag
(
Tags
.
PEER_HOST_IPV4
.
getKey
(),
"127.0.0.1"
).
withTag
(
Tags
.
PEER_PORT
.
getKey
(),
8080
);
startSpan
();
extractInterceptor
.
afterMethod
(
enhancedInstance
,
"extract"
,
new
Object
[]
{
"S.1499746282749.1100157028.88023.1.1|0|1|#127.0.0.1:8080|#testOperationName|T.1499746282768.1100157028.88023.1.2"
},
new
Class
[]
{
String
.
class
},
null
);
new
Object
[]
{
"S.1499746282749.1100157028.88023.1.1|0|1|#127.0.0.1:8080|#testOperationName|
#testOperationName|
T.1499746282768.1100157028.88023.1.2"
},
new
Class
[]
{
String
.
class
},
null
);
stopSpan
();
TraceSegment
tracingSegment
=
assertTraceSemgnets
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录