Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
1135d257
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1135d257
编写于
7月 08, 2017
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add comments about component, abstractSpan
上级
95f65beb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
49 addition
and
0 deletion
+49
-0
apm-network/src/main/java/org/skywalking/apm/network/trace/component/Component.java
...org/skywalking/apm/network/trace/component/Component.java
+5
-0
apm-network/src/main/java/org/skywalking/apm/network/trace/component/ComponentsDefine.java
...walking/apm/network/trace/component/ComponentsDefine.java
+2
-0
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/AbstractSpan.java
...skywalking/apm/agent/core/context/trace/AbstractSpan.java
+9
-0
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java
...ing/apm/agent/core/context/trace/AbstractTracingSpan.java
+33
-0
未找到文件。
apm-network/src/main/java/org/skywalking/apm/network/trace/component/Component.java
浏览文件 @
1135d257
package
org.skywalking.apm.network.trace.component
;
/**
* The <code>Component</code> represents component library,
* which has been supported by skywalking sniffer.
*
* The supported list is in {@link ComponentsDefine}.
*
* @author wusheng
*/
public
interface
Component
{
...
...
apm-network/src/main/java/org/skywalking/apm/network/trace/component/ComponentsDefine.java
浏览文件 @
1135d257
package
org.skywalking.apm.network.trace.component
;
/**
* The supported list of skywalking java sniffer.
*
* @author wusheng
*/
public
class
ComponentsDefine
{
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/AbstractSpan.java
浏览文件 @
1135d257
...
...
@@ -11,10 +11,19 @@ import org.skywalking.apm.network.trace.component.Component;
public
interface
AbstractSpan
{
/**
* Set the component id, which defines in {@link org.skywalking.apm.network.trace.component.ComponentsDefine}
*
* @param component
* @return the span for chaining.
*/
AbstractSpan
setComponent
(
Component
component
);
/**
* Only use this method in explicit instrumentation, like opentracing-skywalking-bridge.
* It it higher recommend don't use this for performance consideration.
*
* @param componentName
* @return the span for chaining.
*/
AbstractSpan
setComponent
(
String
componentName
);
AbstractSpan
setLayer
(
SpanLayer
layer
);
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java
浏览文件 @
1135d257
...
...
@@ -129,16 +129,35 @@ public abstract class AbstractTracingSpan implements AbstractSpan {
return
this
;
}
/**
* In the scope of this span tracing context, error occurred,
* in auto-instrumentation mechanism, almost means throw an exception.
*
* @return span instance, for chaining.
*/
public
AbstractSpan
errorOccurred
()
{
this
.
errorOccurred
=
true
;
return
this
;
}
/**
* Set the operation name, just because these is not compress dictionary value for this name.
* Use the entire string temporarily, the agent will compress this name in async mode.
*
* @param operationName
* @return span instance, for chaining.
*/
public
AbstractTracingSpan
setOperationName
(
String
operationName
)
{
this
.
operationName
=
operationName
;
return
this
;
}
/**
* Set the operation id, which compress by the name.
*
* @param operationId
* @return span instance, for chaining.
*/
public
AbstractTracingSpan
setOperationId
(
int
operationId
)
{
this
.
operationId
=
operationId
;
return
this
;
...
...
@@ -162,12 +181,26 @@ public abstract class AbstractTracingSpan implements AbstractSpan {
return
this
;
}
/**
* Set the component of this span, with internal supported.
* Highly recommend to use this way.
*
* @param component
* @return span instance, for chaining.
*/
@Override
public
AbstractSpan
setComponent
(
Component
component
)
{
this
.
componentId
=
component
.
getId
();
return
this
;
}
/**
* Set the component name.
* By using this, cost more memory and network.
*
* @param componentName
* @return span instance, for chaining.
*/
@Override
public
AbstractSpan
setComponent
(
String
componentName
)
{
this
.
componentName
=
componentName
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录