Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿信在这里
SkyWalking
提交
c71ffbe0
S
SkyWalking
项目概览
阿信在这里
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / 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,发现更多精彩内容 >>
提交
c71ffbe0
编写于
12月 07, 2016
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix span code issue by codebeat.co.
上级
aa458f33
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
63 deletion
+6
-63
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/model/Span.java
...ng-api/src/main/java/com/a/eye/skywalking/model/Span.java
+6
-61
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/util/ContextGenerator.java
...main/java/com/a/eye/skywalking/util/ContextGenerator.java
+0
-2
未找到文件。
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/model/Span.java
浏览文件 @
c71ffbe0
...
@@ -62,15 +62,9 @@ public class Span {
...
@@ -62,15 +62,9 @@ public class Span {
* 业务字段<br/>
* 业务字段<br/>
*/
*/
private
String
businessKey
=
""
;
private
String
businessKey
=
""
;
/**
* 应用编码
*/
private
String
applicationCode
;
/**
* 归属用户
*/
private
String
username
;
private
String
viewPointId
;
private
String
viewPointId
;
private
int
routeKey
;
private
int
routeKey
;
public
Span
(
String
operationName
)
{
public
Span
(
String
operationName
)
{
...
@@ -89,10 +83,9 @@ public class Span {
...
@@ -89,10 +83,9 @@ public class Span {
this
.
traceId
=
traceId
;
this
.
traceId
=
traceId
;
this
.
parentLevel
=
parentLevel
;
this
.
parentLevel
=
parentLevel
;
this
.
levelId
=
levelId
;
this
.
levelId
=
levelId
;
this
.
applicationCode
=
Config
.
SkyWalking
.
APPLICATION_CODE
;
this
.
username
=
Config
.
SkyWalking
.
USERNAME
;
this
.
routeKey
=
routeKey
;
this
.
routeKey
=
routeKey
;
this
.
viewPointId
=
operationName
;
this
.
viewPointId
=
operationName
;
this
.
startDate
=
System
.
currentTimeMillis
();
}
}
public
TraceId
getTraceId
()
{
public
TraceId
getTraceId
()
{
...
@@ -115,26 +108,6 @@ public class Span {
...
@@ -115,26 +108,6 @@ public class Span {
this
.
levelId
=
levelId
;
this
.
levelId
=
levelId
;
}
}
public
long
getStartDate
()
{
return
startDate
;
}
public
void
setStartDate
(
long
startDate
)
{
this
.
startDate
=
startDate
;
}
public
byte
getStatusCode
()
{
return
statusCode
;
}
public
String
getExceptionStack
()
{
return
exceptionStack
;
}
public
void
setExceptionStack
(
String
exceptionStack
)
{
this
.
exceptionStack
=
exceptionStack
;
}
public
void
setSpanType
(
int
spanType
)
{
public
void
setSpanType
(
int
spanType
)
{
this
.
spanType
=
spanType
;
this
.
spanType
=
spanType
;
}
}
...
@@ -183,48 +156,20 @@ public class Span {
...
@@ -183,48 +156,20 @@ public class Span {
this
.
businessKey
=
businessKey
;
this
.
businessKey
=
businessKey
;
}
}
public
String
getApplicationCode
()
{
return
applicationCode
;
}
public
void
setApplicationCode
(
String
applicationCode
)
{
this
.
applicationCode
=
applicationCode
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
void
setViewPointId
(
String
viewPointId
)
{
this
.
viewPointId
=
viewPointId
;
}
public
String
getViewPointId
()
{
return
viewPointId
;
}
public
RequestSpan
.
Builder
buildRequestSpan
(
RequestSpan
.
Builder
builder
)
{
public
RequestSpan
.
Builder
buildRequestSpan
(
RequestSpan
.
Builder
builder
)
{
builder
.
setTraceId
(
this
.
traceId
).
setParentLevel
(
this
.
parentLevel
).
setLevelId
(
this
.
levelId
).
setSpanType
(
this
.
spanType
).
setApplicationCode
(
this
.
applicationCode
)
builder
.
setTraceId
(
this
.
traceId
).
setParentLevel
(
this
.
parentLevel
).
setLevelId
(
this
.
levelId
).
setSpanType
(
this
.
spanType
).
setApplicationCode
(
Config
.
SkyWalking
.
APPLICATION_CODE
)
.
setUsername
(
this
.
username
).
setRouteKey
(
routeKey
);
.
setUsername
(
Config
.
SkyWalking
.
USERNAME
).
setRouteKey
(
routeKey
);
return
builder
;
return
builder
;
}
}
public
AckSpan
.
Builder
buildAckSpan
(
AckSpan
.
Builder
builder
)
{
public
AckSpan
.
Builder
buildAckSpan
(
AckSpan
.
Builder
builder
)
{
builder
.
setTraceId
(
this
.
traceId
).
setParentLevel
(
this
.
parentLevel
).
setLevelId
(
this
.
levelId
)
builder
.
setTraceId
(
this
.
traceId
).
setParentLevel
(
this
.
parentLevel
).
setLevelId
(
this
.
levelId
)
.
setCost
(
System
.
currentTimeMillis
()
-
this
.
startDate
).
setStatusCode
(
this
.
statusCode
)
.
setCost
(
System
.
currentTimeMillis
()
-
this
.
startDate
).
setStatusCode
(
this
.
statusCode
)
.
setExceptionStack
(
this
.
exceptionStack
).
setUsername
(
this
.
username
).
setApplicationCode
(
this
.
applicationCode
)
.
setExceptionStack
(
this
.
exceptionStack
).
setUsername
(
Config
.
SkyWalking
.
USERNAME
).
setApplicationCode
(
Config
.
SkyWalking
.
APPLICATION_CODE
)
.
setViewpointId
(
this
.
viewPointId
).
setRouteKey
(
routeKey
);
.
setViewpointId
(
this
.
viewPointId
).
setRouteKey
(
routeKey
);
return
builder
;
return
builder
;
}
}
public
void
setRouteKey
(
int
routeKey
)
{
this
.
routeKey
=
routeKey
;
}
public
int
getRouteKey
()
{
public
int
getRouteKey
()
{
return
routeKey
;
return
routeKey
;
}
}
...
...
skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/util/ContextGenerator.java
浏览文件 @
c71ffbe0
...
@@ -50,8 +50,6 @@ public final class ContextGenerator {
...
@@ -50,8 +50,6 @@ public final class ContextGenerator {
span
=
new
Span
(
parentSpan
,
id
.
getViewPoint
());
span
=
new
Span
(
parentSpan
,
id
.
getViewPoint
());
}
}
span
.
setStartDate
(
System
.
currentTimeMillis
());
return
span
;
return
span
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录