Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
killuaz丶x
SkyWalking
提交
62ff02bf
S
SkyWalking
项目概览
killuaz丶x
/
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,发现更多精彩内容 >>
未验证
提交
62ff02bf
编写于
12月 20, 2017
作者:
wu-sheng
提交者:
GitHub
12月 20, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into wusheng/add-notice
上级
585e59a1
40df9608
变更
17
显示空白变更内容
内联
并排
Showing
17 changed file
with
48 addition
and
41 deletion
+48
-41
apm-collector/apm-collector-agent-grpc/collector-agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/handler/ApplicationRegisterServiceHandler.java
...agent/grpc/handler/ApplicationRegisterServiceHandler.java
+6
-6
apm-collector/apm-collector-agent-grpc/collector-agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/handler/ApplicationRegisterServiceHandlerTestCase.java
...pc/handler/ApplicationRegisterServiceHandlerTestCase.java
+5
-5
apm-network/src/main/proto/ApplicationRegisterService.proto
apm-network/src/main/proto/ApplicationRegisterService.proto
+5
-5
apm-network/src/main/proto/TraceSegmentService.proto
apm-network/src/main/proto/TraceSegmentService.proto
+1
-0
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/SpanLayer.java
...he/skywalking/apm/agent/core/context/trace/SpanLayer.java
+6
-2
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/dictionary/ApplicationDictionary.java
...king/apm/agent/core/dictionary/ApplicationDictionary.java
+6
-6
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AppAndServiceRegisterClient.java
...ng/apm/agent/core/remote/AppAndServiceRegisterClient.java
+6
-6
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/sampling/SamplingService.java
...e/skywalking/apm/agent/core/sampling/SamplingService.java
+4
-2
apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
...kywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptorTest.java
...lking/apm/plugin/jedis/v2/JedisMethodInterceptorTest.java
+1
-1
apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/AbstractMessageConsumeInterceptor.java
...plugin/rocketMQ/v4/AbstractMessageConsumeInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/MessageSendInterceptor.java
...alking/apm/plugin/rocketMQ/v4/MessageSendInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java
...pm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptorTest.java
...lugin/spymemcached/v2/MemcachedMethodInterceptorTest.java
+1
-1
apm-sniffer/apm-sdk-plugin/xmemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/xmemcached/v2/XMemcachedMethodInterceptor.java
...apm/plugin/xmemcached/v2/XMemcachedMethodInterceptor.java
+1
-1
apm-sniffer/apm-sdk-plugin/xmemcached-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/xmemcached/v2/XMemcachedMethodInterceptorTest.java
...plugin/xmemcached/v2/XMemcachedMethodInterceptorTest.java
+1
-1
docs/README_ZH.md
docs/README_ZH.md
+1
-1
未找到文件。
apm-collector/apm-collector-agent-grpc/collector-agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/handler/ApplicationRegisterServiceHandler.java
浏览文件 @
62ff02bf
...
...
@@ -25,9 +25,9 @@ import org.apache.skywalking.apm.collector.agent.stream.AgentStreamModule;
import
org.apache.skywalking.apm.collector.agent.stream.service.register.IApplicationIDService
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.server.grpc.GRPCHandler
;
import
org.apache.skywalking.apm.network.proto.Application
;
import
org.apache.skywalking.apm.network.proto.ApplicationMapping
;
import
org.apache.skywalking.apm.network.proto.ApplicationMappings
;
import
org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc
;
import
org.apache.skywalking.apm.network.proto.Applications
;
import
org.apache.skywalking.apm.network.proto.KeyWithIntegerValue
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -45,18 +45,18 @@ public class ApplicationRegisterServiceHandler extends ApplicationRegisterServic
applicationIDService
=
moduleManager
.
find
(
AgentStreamModule
.
NAME
).
getService
(
IApplicationIDService
.
class
);
}
@Override
public
void
register
(
Application
request
,
StreamObserver
<
ApplicationMapping
>
responseObserver
)
{
@Override
public
void
batchRegister
(
Applications
request
,
StreamObserver
<
ApplicationMappings
>
responseObserver
)
{
logger
.
debug
(
"register application"
);
ProtocolStringList
applicationCodes
=
request
.
getApplicationCodeList
();
ProtocolStringList
applicationCodes
=
request
.
getApplicationCode
s
List
();
ApplicationMapping
.
Builder
builder
=
ApplicationMapping
.
newBuilder
();
ApplicationMapping
s
.
Builder
builder
=
ApplicationMappings
.
newBuilder
();
for
(
int
i
=
0
;
i
<
applicationCodes
.
size
();
i
++)
{
String
applicationCode
=
applicationCodes
.
get
(
i
);
int
applicationId
=
applicationIDService
.
getOrCreate
(
applicationCode
);
if
(
applicationId
!=
0
)
{
KeyWithIntegerValue
value
=
KeyWithIntegerValue
.
newBuilder
().
setKey
(
applicationCode
).
setValue
(
applicationId
).
build
();
builder
.
addApplication
(
value
);
builder
.
addApplication
s
(
value
);
}
}
responseObserver
.
onNext
(
builder
.
build
());
...
...
apm-collector/apm-collector-agent-grpc/collector-agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/handler/ApplicationRegisterServiceHandlerTestCase.java
浏览文件 @
62ff02bf
...
...
@@ -21,9 +21,9 @@ package org.apache.skywalking.apm.collector.agent.grpc.handler;
import
io.grpc.ManagedChannel
;
import
io.grpc.ManagedChannelBuilder
;
import
org.apache.skywalking.apm.network.proto.Application
;
import
org.apache.skywalking.apm.network.proto.ApplicationMapping
;
import
org.apache.skywalking.apm.network.proto.ApplicationMappings
;
import
org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc
;
import
org.apache.skywalking.apm.network.proto.Applications
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -40,8 +40,8 @@ public class ApplicationRegisterServiceHandlerTestCase {
ManagedChannel
channel
=
ManagedChannelBuilder
.
forAddress
(
"localhost"
,
11800
).
usePlaintext
(
true
).
build
();
stub
=
ApplicationRegisterServiceGrpc
.
newBlockingStub
(
channel
);
Application
application
=
Application
.
newBuilder
().
addApplicationCode
(
"test141"
).
build
();
ApplicationMapping
mapping
=
stub
.
r
egister
(
application
);
logger
.
debug
(
mapping
.
getApplication
(
0
).
getKey
()
+
", "
+
mapping
.
getApplication
(
0
).
getValue
());
Application
s
application
=
Applications
.
newBuilder
().
addApplicationCodes
(
"test141"
).
build
();
ApplicationMapping
s
mapping
=
stub
.
batchR
egister
(
application
);
logger
.
debug
(
mapping
.
getApplication
s
(
0
).
getKey
()
+
", "
+
mapping
.
getApplications
(
0
).
getValue
());
}
}
apm-network/src/main/proto/ApplicationRegisterService.proto
浏览文件 @
62ff02bf
...
...
@@ -7,14 +7,14 @@ import "KeyWithIntegerValue.proto";
//register service for ApplicationCode, this service is called when service starts.
service
ApplicationRegisterService
{
rpc
register
(
Application
)
returns
(
ApplicationMapping
)
{
rpc
batchRegister
(
Applications
)
returns
(
ApplicationMappings
)
{
}
}
message
Application
{
repeated
string
applicationCode
=
1
;
message
Application
s
{
repeated
string
applicationCode
s
=
1
;
}
message
ApplicationMapping
{
repeated
KeyWithIntegerValue
application
=
1
;
message
ApplicationMapping
s
{
repeated
KeyWithIntegerValue
application
s
=
1
;
}
apm-network/src/main/proto/TraceSegmentService.proto
浏览文件 @
62ff02bf
...
...
@@ -78,6 +78,7 @@ enum SpanLayer {
RPCFramework
=
2
;
Http
=
3
;
MQ
=
4
;
Cache
=
5
;
}
message
LogMessage
{
...
...
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/SpanLayer.java
浏览文件 @
62ff02bf
...
...
@@ -16,7 +16,6 @@
*
*/
package
org.apache.skywalking.apm.agent.core.context.trace
;
/**
...
...
@@ -26,7 +25,8 @@ public enum SpanLayer {
DB
(
1
),
RPC_FRAMEWORK
(
2
),
HTTP
(
3
),
MQ
(
4
);
MQ
(
4
),
CACHE
(
5
);
private
int
code
;
...
...
@@ -42,6 +42,10 @@ public enum SpanLayer {
span
.
setLayer
(
SpanLayer
.
DB
);
}
public
static
void
asCache
(
AbstractSpan
span
)
{
span
.
setLayer
(
SpanLayer
.
CACHE
);
}
public
static
void
asRPCFramework
(
AbstractSpan
span
)
{
span
.
setLayer
(
SpanLayer
.
RPC_FRAMEWORK
);
}
...
...
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/dictionary/ApplicationDictionary.java
浏览文件 @
62ff02bf
...
...
@@ -23,9 +23,9 @@ import io.netty.util.internal.ConcurrentSet;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.concurrent.ConcurrentHashMap
;
import
org.apache.skywalking.apm.network.proto.Application
;
import
org.apache.skywalking.apm.network.proto.ApplicationMapping
;
import
org.apache.skywalking.apm.network.proto.ApplicationMappings
;
import
org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc
;
import
org.apache.skywalking.apm.network.proto.Applications
;
import
org.apache.skywalking.apm.network.proto.KeyWithIntegerValue
;
import
static
org
.
apache
.
skywalking
.
apm
.
agent
.
core
.
conf
.
Config
.
Dictionary
.
APPLICATION_CODE_BUFFER_SIZE
;
...
...
@@ -55,10 +55,10 @@ public enum ApplicationDictionary {
public
void
syncRemoteDictionary
(
ApplicationRegisterServiceGrpc
.
ApplicationRegisterServiceBlockingStub
applicationRegisterServiceBlockingStub
)
{
if
(
unRegisterApplications
.
size
()
>
0
)
{
ApplicationMapping
applicationMapping
=
applicationRegisterServiceBlockingStub
.
r
egister
(
Application
.
newBuilder
().
addAllApplicationCode
(
unRegisterApplications
).
build
());
if
(
applicationMapping
.
getApplicationCount
()
>
0
)
{
for
(
KeyWithIntegerValue
keyWithIntegerValue
:
applicationMapping
.
getApplicationList
())
{
ApplicationMapping
s
applicationMapping
=
applicationRegisterServiceBlockingStub
.
batchR
egister
(
Application
s
.
newBuilder
().
addAllApplicationCodes
(
unRegisterApplications
).
build
());
if
(
applicationMapping
.
getApplication
s
Count
()
>
0
)
{
for
(
KeyWithIntegerValue
keyWithIntegerValue
:
applicationMapping
.
getApplication
s
List
())
{
unRegisterApplications
.
remove
(
keyWithIntegerValue
.
getKey
());
applicationDictionary
.
put
(
keyWithIntegerValue
.
getKey
(),
keyWithIntegerValue
.
getValue
());
}
...
...
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AppAndServiceRegisterClient.java
浏览文件 @
62ff02bf
...
...
@@ -38,13 +38,13 @@ import org.apache.skywalking.apm.agent.core.dictionary.DictionaryUtil;
import
org.apache.skywalking.apm.agent.core.dictionary.OperationNameDictionary
;
import
org.apache.skywalking.apm.agent.core.logging.api.ILog
;
import
org.apache.skywalking.apm.agent.core.logging.api.LogManager
;
import
org.apache.skywalking.apm.network.proto.Application
;
import
org.apache.skywalking.apm.network.proto.ApplicationInstance
;
import
org.apache.skywalking.apm.network.proto.ApplicationInstanceHeartbeat
;
import
org.apache.skywalking.apm.network.proto.ApplicationInstanceMapping
;
import
org.apache.skywalking.apm.network.proto.ApplicationInstanceRecover
;
import
org.apache.skywalking.apm.network.proto.ApplicationMapping
;
import
org.apache.skywalking.apm.network.proto.ApplicationMapping
s
;
import
org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc
;
import
org.apache.skywalking.apm.network.proto.Applications
;
import
org.apache.skywalking.apm.network.proto.InstanceDiscoveryServiceGrpc
;
import
org.apache.skywalking.apm.network.proto.ServiceNameDiscoveryServiceGrpc
;
...
...
@@ -112,10 +112,10 @@ public class AppAndServiceRegisterClient implements BootService, GRPCChannelList
try
{
if
(
RemoteDownstreamConfig
.
Agent
.
APPLICATION_ID
==
DictionaryUtil
.
nullValue
())
{
if
(
applicationRegisterServiceBlockingStub
!=
null
)
{
ApplicationMapping
applicationMapping
=
applicationRegisterServiceBlockingStub
.
r
egister
(
Application
.
newBuilder
().
addApplicationCode
(
Config
.
Agent
.
APPLICATION_CODE
).
build
());
if
(
applicationMapping
.
getApplicationCount
()
>
0
)
{
RemoteDownstreamConfig
.
Agent
.
APPLICATION_ID
=
applicationMapping
.
getApplication
(
0
).
getValue
();
ApplicationMapping
s
applicationMapping
=
applicationRegisterServiceBlockingStub
.
batchR
egister
(
Application
s
.
newBuilder
().
addApplicationCodes
(
Config
.
Agent
.
APPLICATION_CODE
).
build
());
if
(
applicationMapping
.
getApplication
s
Count
()
>
0
)
{
RemoteDownstreamConfig
.
Agent
.
APPLICATION_ID
=
applicationMapping
.
getApplication
s
(
0
).
getValue
();
shouldTry
=
true
;
}
}
...
...
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/sampling/SamplingService.java
浏览文件 @
62ff02bf
...
...
@@ -26,10 +26,10 @@ import java.util.concurrent.TimeUnit;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.apache.skywalking.apm.agent.core.boot.BootService
;
import
org.apache.skywalking.apm.agent.core.boot.DefaultNamedThreadFactory
;
import
org.apache.skywalking.apm.agent.core.conf.Config
;
import
org.apache.skywalking.apm.agent.core.context.trace.TraceSegment
;
import
org.apache.skywalking.apm.agent.core.logging.api.ILog
;
import
org.apache.skywalking.apm.agent.core.logging.api.LogManager
;
import
org.apache.skywalking.apm.agent.core.conf.Config
;
/**
* The <code>SamplingService</code> take charge of how to sample the {@link TraceSegment}. Every {@link TraceSegment}s
...
...
@@ -83,8 +83,10 @@ public class SamplingService implements BootService {
@Override
public
void
shutdown
()
throws
Throwable
{
if
(
scheduledFuture
!=
null
)
{
scheduledFuture
.
cancel
(
true
);
}
}
/**
* @return true, if sampling mechanism is on, and getDefault the sampling factor successfully.
...
...
apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
浏览文件 @
62ff02bf
...
...
@@ -37,7 +37,7 @@ public class JedisMethodInterceptor implements InstanceMethodsAroundInterceptor
AbstractSpan
span
=
ContextManager
.
createExitSpan
(
"Jedis/"
+
method
.
getName
(),
peer
);
span
.
setComponent
(
ComponentsDefine
.
REDIS
);
Tags
.
DB_TYPE
.
set
(
span
,
"Redis"
);
SpanLayer
.
as
DB
(
span
);
SpanLayer
.
as
Cache
(
span
);
if
(
allArguments
.
length
>
0
&&
allArguments
[
0
]
instanceof
String
)
{
Tags
.
DB_STATEMENT
.
set
(
span
,
method
.
getName
()
+
" "
+
allArguments
[
0
]);
...
...
apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptorTest.java
浏览文件 @
62ff02bf
...
...
@@ -132,7 +132,7 @@ public class JedisMethodInterceptorTest {
List
<
KeyValuePair
>
tags
=
SpanHelper
.
getTags
(
span
);
assertThat
(
tags
.
get
(
0
).
getValue
(),
is
(
"Redis"
));
assertThat
(
tags
.
get
(
1
).
getValue
(),
is
(
"set OperationKey"
));
assertThat
(
SpanHelper
.
getLayer
(
span
),
CoreMatchers
.
is
(
SpanLayer
.
DB
));
assertThat
(
SpanHelper
.
getLayer
(
span
),
CoreMatchers
.
is
(
SpanLayer
.
CACHE
));
}
private
Method
getMockSetMethod
()
{
...
...
apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/AbstractMessageConsumeInterceptor.java
浏览文件 @
62ff02bf
...
...
@@ -53,7 +53,7 @@ public abstract class AbstractMessageConsumeInterceptor implements InstanceMetho
AbstractSpan
span
=
ContextManager
.
createEntrySpan
(
COMSUMER_OPERATION_NAME_PREFIX
+
msgs
.
get
(
0
).
getTopic
()
+
"/Consumer"
,
contextCarrier
);
span
.
setComponent
(
ComponentsDefine
.
ROCKET_MQ
);
span
.
setLayer
(
SpanLayer
.
MQ
);
SpanLayer
.
asMQ
(
span
);
for
(
int
i
=
1
;
i
<
msgs
.
size
();
i
++)
{
ContextManager
.
extract
(
getContextCarrierFromMessage
(
msgs
.
get
(
i
)));
}
...
...
apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/MessageSendInterceptor.java
浏览文件 @
62ff02bf
...
...
@@ -60,7 +60,7 @@ public class MessageSendInterceptor implements InstanceMethodsAroundInterceptor
String
namingServiceAddress
=
String
.
valueOf
(
objInst
.
getSkyWalkingDynamicField
());
AbstractSpan
span
=
ContextManager
.
createExitSpan
(
buildOperationName
(
message
.
getTopic
()),
contextCarrier
,
namingServiceAddress
);
span
.
setComponent
(
ComponentsDefine
.
ROCKET_MQ
);
span
.
setLayer
(
SpanLayer
.
MQ
);
SpanLayer
.
asMQ
(
span
);
span
.
tag
(
"brokerName"
,
(
String
)
allArguments
[
1
]);
span
.
tag
(
"tags"
,
message
.
getTags
());
span
.
tag
(
"communication.mode"
,
((
CommunicationMode
)
allArguments
[
5
]).
name
());
...
...
apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java
浏览文件 @
62ff02bf
...
...
@@ -40,7 +40,7 @@ public class MemcachedMethodInterceptor implements InstanceMethodsAroundIntercep
AbstractSpan
span
=
ContextManager
.
createExitSpan
(
SPY_MEMCACHE
+
method
.
getName
(),
peer
);
span
.
setComponent
(
ComponentsDefine
.
MEMCACHED
);
Tags
.
DB_TYPE
.
set
(
span
,
ComponentsDefine
.
MEMCACHED
.
getName
());
SpanLayer
.
as
DB
(
span
);
SpanLayer
.
as
Cache
(
span
);
Tags
.
DB_STATEMENT
.
set
(
span
,
method
.
getName
()
+
" "
+
allArguments
[
0
]);
}
...
...
apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptorTest.java
浏览文件 @
62ff02bf
...
...
@@ -116,7 +116,7 @@ public class MemcachedMethodInterceptorTest {
List
<
KeyValuePair
>
tags
=
SpanHelper
.
getTags
(
span
);
assertThat
(
tags
.
get
(
0
).
getValue
(),
is
(
"Memcached"
));
assertThat
(
tags
.
get
(
1
).
getValue
(),
is
(
"set OperationKey"
));
MatcherAssert
.
assertThat
(
SpanHelper
.
getLayer
(
span
),
CoreMatchers
.
is
(
SpanLayer
.
DB
));
MatcherAssert
.
assertThat
(
SpanHelper
.
getLayer
(
span
),
CoreMatchers
.
is
(
SpanLayer
.
CACHE
));
}
private
Method
getMockSetMethod
()
{
...
...
apm-sniffer/apm-sdk-plugin/xmemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/xmemcached/v2/XMemcachedMethodInterceptor.java
浏览文件 @
62ff02bf
...
...
@@ -46,7 +46,7 @@ public class XMemcachedMethodInterceptor implements InstanceMethodsAroundInterce
AbstractSpan
span
=
ContextManager
.
createExitSpan
(
XMEMCACHED
+
method
.
getName
(),
peer
);
span
.
setComponent
(
ComponentsDefine
.
MEMCACHED
);
Tags
.
DB_TYPE
.
set
(
span
,
ComponentsDefine
.
MEMCACHED
.
getName
());
SpanLayer
.
as
DB
(
span
);
SpanLayer
.
as
Cache
(
span
);
Tags
.
DB_STATEMENT
.
set
(
span
,
method
.
getName
()
+
" "
+
allArguments
[
0
]);
}
...
...
apm-sniffer/apm-sdk-plugin/xmemcached-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/xmemcached/v2/XMemcachedMethodInterceptorTest.java
浏览文件 @
62ff02bf
...
...
@@ -119,7 +119,7 @@ public class XMemcachedMethodInterceptorTest {
List
<
KeyValuePair
>
tags
=
SpanHelper
.
getTags
(
span
);
assertThat
(
tags
.
get
(
0
).
getValue
(),
is
(
"Memcached"
));
assertThat
(
tags
.
get
(
1
).
getValue
(),
is
(
"set OperationKey"
));
assertThat
(
SpanHelper
.
getLayer
(
span
),
CoreMatchers
.
is
(
SpanLayer
.
DB
));
assertThat
(
SpanHelper
.
getLayer
(
span
),
CoreMatchers
.
is
(
SpanLayer
.
CACHE
));
}
private
Method
getMockSetMethod
()
throws
Exception
{
...
...
docs/README_ZH.md
浏览文件 @
62ff02bf
...
...
@@ -10,7 +10,7 @@
*
[
中间件,框架与类库支持列表
](
Supported-list.md
)
*
[
如何关闭特定插件
](
cn/How-to-disable-plugin-CN.md
)
*
APM相关介绍资料
*
[
OpenTracing中文版
](
https://github.com/opentracing-contrib/opentracing-specification-zh
.md
)
*
[
OpenTracing中文版
](
https://github.com/opentracing-contrib/opentracing-specification-zh
)
*
Application Toolkit,应用程序工具包
*
[
概述
](
cn/Application-toolkit-CN.md
)
*
[
OpenTracing Tracer
](
cn/skywalking-opentracing-CN.md
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录