Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
d2f562f1
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
d2f562f1
编写于
6月 28, 2017
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adjust segment service and span interface.
上级
e09741c8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
71 addition
and
10 deletion
+71
-10
apm-network/src/main/java/org/skywalking/apm/network/trace/component/Component.java
...org/skywalking/apm/network/trace/component/Component.java
+10
-0
apm-network/src/main/java/org/skywalking/apm/network/trace/component/ComponentsDefine.java
...walking/apm/network/trace/component/ComponentsDefine.java
+8
-0
apm-network/src/main/java/org/skywalking/apm/network/trace/component/OfficialComponent.java
...alking/apm/network/trace/component/OfficialComponent.java
+24
-0
apm-network/src/main/proto/TraceSegmentService.proto
apm-network/src/main/proto/TraceSegmentService.proto
+10
-8
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
+10
-2
未找到文件。
apm-network/src/main/java/org/skywalking/apm/network/trace/component/Component.java
0 → 100644
浏览文件 @
d2f562f1
package
org.skywalking.apm.network.trace.component
;
/**
* @author wusheng
*/
public
interface
Component
{
int
getId
();
String
getName
();
}
apm-network/src/main/java/org/skywalking/apm/network/trace/component/ComponentsDefine.java
0 → 100644
浏览文件 @
d2f562f1
package
org.skywalking.apm.network.trace.component
;
/**
* @author wusheng
*/
public
class
ComponentsDefine
{
public
static
final
OfficialComponent
TOMCAT
=
new
OfficialComponent
(
1
,
"Tomcat"
);
}
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/component/Abstract
Component.java
→
apm-
network/src/main/java/org/skywalking/apm/network/trace/component/Official
Component.java
浏览文件 @
d2f562f1
package
org.skywalking.apm.
agent.core.context
.component
;
package
org.skywalking.apm.
network.trace
.component
;
/**
* @author wusheng
*/
public
abstract
class
AbstractComponent
{
public
class
OfficialComponent
implements
Component
{
private
int
id
;
private
String
name
;
p
rotected
Abstract
Component
(
int
id
,
String
name
)
{
p
ublic
Official
Component
(
int
id
,
String
name
)
{
this
.
id
=
id
;
this
.
name
=
name
;
}
@Override
public
int
getId
()
{
return
id
;
}
@Override
public
String
getName
()
{
return
name
;
}
}
apm-network/src/main/proto/TraceSegmentService.proto
浏览文件 @
d2f562f1
...
...
@@ -38,14 +38,16 @@ message SpanObject {
int64
startTime
=
3
;
int64
endTime
=
4
;
int32
operationNameId
=
5
;
int32
peerId
=
6
;
string
peer
=
7
;
SpanType
spanType
=
8
;
SpanLayer
spanLayer
=
9
;
string
component
=
10
;
bool
isError
=
11
;
repeated
KeyValue
tags
=
12
;
repeated
LogMessage
logs
=
13
;
string
operationName
=
6
;
int32
peerId
=
7
;
string
peer
=
8
;
SpanType
spanType
=
9
;
SpanLayer
spanLayer
=
10
;
int32
componentId
=
11
;
string
component
=
12
;
bool
isError
=
13
;
repeated
KeyValue
tags
=
14
;
repeated
LogMessage
logs
=
15
;
}
enum
SpanType
{
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/AbstractSpan.java
浏览文件 @
d2f562f1
package
org.skywalking.apm.agent.core.context.trace
;
import
org.skywalking.apm.network.trace.component.Component
;
/**
* The <code>AbstractSpan</code> represents the span's skeleton,
...
...
@@ -8,6 +9,14 @@ package org.skywalking.apm.agent.core.context.trace;
* @author wusheng
*/
public
interface
AbstractSpan
{
/**
* Set the component id, which defines in {@link org.skywalking.apm.network.trace.component.ComponentsDefine}
* @param component
*/
void
setComponent
(
Component
component
);
void
setComponent
(
String
componentName
);
void
setLayer
(
SpanLayer
layer
);
/**
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java
浏览文件 @
d2f562f1
...
...
@@ -2,10 +2,10 @@ package org.skywalking.apm.agent.core.context.trace;
import
java.util.LinkedList
;
import
java.util.List
;
import
org.skywalking.apm.agent.core.context.component.AbstractComponent
;
import
org.skywalking.apm.agent.core.context.util.KeyValuePair
;
import
org.skywalking.apm.agent.core.context.util.ThrowableTransformer
;
import
org.skywalking.apm.agent.core.dictionary.DictionaryUtil
;
import
org.skywalking.apm.network.trace.component.Component
;
/**
* The <code>AbstractTracingSpan</code> represents a group of {@link AbstractSpan} implementations,
...
...
@@ -35,6 +35,8 @@ public abstract class AbstractTracingSpan implements AbstractSpan {
protected
int
componentId
=
0
;
protected
String
componentName
;
/**
* Log is a concept from OpenTracing spec.
* <p>
...
...
@@ -123,7 +125,13 @@ public abstract class AbstractTracingSpan implements AbstractSpan {
this
.
layer
=
layer
;
}
public
void
setComponent
(
AbstractComponent
component
){
@Override
public
void
setComponent
(
Component
component
)
{
this
.
componentId
=
component
.
getId
();
}
@Override
public
void
setComponent
(
String
componentName
)
{
this
.
componentName
=
componentName
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录