Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
润土的好友猹
SkyWalking
提交
c9bb3411
S
SkyWalking
项目概览
润土的好友猹
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
9
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,发现更多精彩内容 >>
未验证
提交
c9bb3411
编写于
3月 05, 2018
作者:
wu-sheng
提交者:
GitHub
3月 05, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #883 from peng-yongsheng/fixed/855
Fixed/855
上级
a8459e6b
07151c5e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
14 deletion
+34
-14
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingSpanListener.java
...r/application/mapping/ApplicationMappingSpanListener.java
+13
-10
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricSpanListener.java
...service/refmetric/ServiceReferenceMetricSpanListener.java
+12
-3
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/utils/PaginationUtils.java
...he/skywalking/apm/collector/ui/utils/PaginationUtils.java
+1
-1
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/ui/utils/PaginationUtilsTestCase.java
...lking/apm/collector/ui/utils/PaginationUtilsTestCase.java
+7
-0
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
...-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
+1
-0
未找到文件。
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingSpanListener.java
浏览文件 @
c9bb3411
...
@@ -34,6 +34,7 @@ import org.apache.skywalking.apm.collector.core.module.ModuleManager;
...
@@ -34,6 +34,7 @@ import org.apache.skywalking.apm.collector.core.module.ModuleManager;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping
;
import
org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping
;
import
org.apache.skywalking.apm.network.proto.SpanLayer
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -54,18 +55,20 @@ public class ApplicationMappingSpanListener implements FirstSpanListener, EntryS
...
@@ -54,18 +55,20 @@ public class ApplicationMappingSpanListener implements FirstSpanListener, EntryS
@Override
public
void
parseEntry
(
SpanDecorator
spanDecorator
,
int
applicationId
,
int
instanceId
,
String
segmentId
)
{
@Override
public
void
parseEntry
(
SpanDecorator
spanDecorator
,
int
applicationId
,
int
instanceId
,
String
segmentId
)
{
logger
.
debug
(
"application mapping listener parse reference"
);
logger
.
debug
(
"application mapping listener parse reference"
);
if
(
spanDecorator
.
getRefsCount
()
>
0
)
{
if
(!
spanDecorator
.
getSpanLayer
().
equals
(
SpanLayer
.
MQ
))
{
for
(
int
i
=
0
;
i
<
spanDecorator
.
getRefsCount
();
i
++)
{
if
(
spanDecorator
.
getRefsCount
()
>
0
)
{
ApplicationMapping
applicationMapping
=
new
ApplicationMapping
();
for
(
int
i
=
0
;
i
<
spanDecorator
.
getRefsCount
();
i
++)
{
applicationMapping
.
setApplicationId
(
applicationId
);
ApplicationMapping
applicationMapping
=
new
ApplicationMapping
();
applicationMapping
.
setApplicationId
(
applicationId
);
int
addressId
=
spanDecorator
.
getRefs
(
i
).
getNetworkAddressId
();
int
addressId
=
spanDecorator
.
getRefs
(
i
).
getNetworkAddressId
();
int
mappingApplicationId
=
applicationCacheService
.
getApplicationIdByAddressId
(
addressId
);
int
mappingApplicationId
=
applicationCacheService
.
getApplicationIdByAddressId
(
addressId
);
applicationMapping
.
setMappingApplicationId
(
mappingApplicationId
);
applicationMapping
.
setMappingApplicationId
(
mappingApplicationId
);
String
metricId
=
String
.
valueOf
(
applicationId
)
+
Const
.
ID_SPLIT
+
String
.
valueOf
(
applicationMapping
.
getMappingApplicationId
());
String
metricId
=
String
.
valueOf
(
applicationId
)
+
Const
.
ID_SPLIT
+
String
.
valueOf
(
applicationMapping
.
getMappingApplicationId
());
applicationMapping
.
setMetricId
(
metricId
);
applicationMapping
.
setMetricId
(
metricId
);
applicationMappings
.
add
(
applicationMapping
);
applicationMappings
.
add
(
applicationMapping
);
}
}
}
}
}
}
}
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricSpanListener.java
浏览文件 @
c9bb3411
...
@@ -20,7 +20,6 @@ package org.apache.skywalking.apm.collector.analysis.metric.provider.worker.serv
...
@@ -20,7 +20,6 @@ package org.apache.skywalking.apm.collector.analysis.metric.provider.worker.serv
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.storage.table.MetricSource
;
import
org.apache.skywalking.apm.collector.analysis.metric.define.graph.MetricGraphIdDefine
;
import
org.apache.skywalking.apm.collector.analysis.metric.define.graph.MetricGraphIdDefine
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.ReferenceDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.ReferenceDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator
;
...
@@ -38,6 +37,7 @@ import org.apache.skywalking.apm.collector.core.module.ModuleManager;
...
@@ -38,6 +37,7 @@ import org.apache.skywalking.apm.collector.core.module.ModuleManager;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.ObjectUtils
;
import
org.apache.skywalking.apm.collector.core.util.ObjectUtils
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.storage.table.MetricSource
;
import
org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric
;
import
org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric
;
import
org.apache.skywalking.apm.network.proto.SpanLayer
;
import
org.apache.skywalking.apm.network.proto.SpanLayer
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -78,8 +78,17 @@ public class ServiceReferenceMetricSpanListener implements FirstSpanListener, En
...
@@ -78,8 +78,17 @@ public class ServiceReferenceMetricSpanListener implements FirstSpanListener, En
ReferenceDecorator
reference
=
spanDecorator
.
getRefs
(
i
);
ReferenceDecorator
reference
=
spanDecorator
.
getRefs
(
i
);
ServiceReferenceMetric
serviceReferenceMetric
=
new
ServiceReferenceMetric
();
ServiceReferenceMetric
serviceReferenceMetric
=
new
ServiceReferenceMetric
();
serviceReferenceMetric
.
setFrontServiceId
(
reference
.
getParentServiceId
());
serviceReferenceMetric
.
setFrontServiceId
(
reference
.
getParentServiceId
());
serviceReferenceMetric
.
setFrontInstanceId
(
reference
.
getParentApplicationInstanceId
());
serviceReferenceMetric
.
setFrontApplicationId
(
instanceCacheService
.
getApplicationId
(
reference
.
getParentApplicationInstanceId
()));
if
(
spanDecorator
.
getSpanLayer
().
equals
(
SpanLayer
.
MQ
))
{
int
peerId
=
spanDecorator
.
getPeerId
();
int
applicationIdByPeerId
=
applicationCacheService
.
getApplicationIdByAddressId
(
peerId
);
int
instanceIdByPeerId
=
instanceCacheService
.
getInstanceIdByAddressId
(
applicationIdByPeerId
,
peerId
);
serviceReferenceMetric
.
setFrontInstanceId
(
instanceIdByPeerId
);
serviceReferenceMetric
.
setFrontApplicationId
(
applicationIdByPeerId
);
}
else
{
serviceReferenceMetric
.
setFrontInstanceId
(
reference
.
getParentApplicationInstanceId
());
serviceReferenceMetric
.
setFrontApplicationId
(
instanceCacheService
.
getApplicationId
(
reference
.
getParentApplicationInstanceId
()));
}
serviceReferenceMetric
.
setBehindServiceId
(
spanDecorator
.
getOperationNameId
());
serviceReferenceMetric
.
setBehindServiceId
(
spanDecorator
.
getOperationNameId
());
serviceReferenceMetric
.
setBehindInstanceId
(
instanceId
);
serviceReferenceMetric
.
setBehindInstanceId
(
instanceId
);
serviceReferenceMetric
.
setBehindApplicationId
(
applicationId
);
serviceReferenceMetric
.
setBehindApplicationId
(
applicationId
);
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/utils/PaginationUtils.java
浏览文件 @
c9bb3411
...
@@ -28,7 +28,7 @@ public enum PaginationUtils {
...
@@ -28,7 +28,7 @@ public enum PaginationUtils {
public
Page
exchange
(
Pagination
paging
)
{
public
Page
exchange
(
Pagination
paging
)
{
int
limit
=
paging
.
getPageSize
();
int
limit
=
paging
.
getPageSize
();
int
from
=
paging
.
getPageSize
()
*
(
paging
.
getPageNum
(
)
-
1
);
int
from
=
paging
.
getPageSize
()
*
(
(
paging
.
getPageNum
()
==
0
?
1
:
paging
.
getPageNum
()
)
-
1
);
return
new
Page
(
from
,
limit
);
return
new
Page
(
from
,
limit
);
}
}
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/ui/utils/PaginationUtilsTestCase.java
浏览文件 @
c9bb3411
...
@@ -37,6 +37,13 @@ public class PaginationUtilsTestCase {
...
@@ -37,6 +37,13 @@ public class PaginationUtilsTestCase {
Assert
.
assertEquals
(
0
,
page
.
getFrom
());
Assert
.
assertEquals
(
0
,
page
.
getFrom
());
Assert
.
assertEquals
(
10
,
page
.
getLimit
());
Assert
.
assertEquals
(
10
,
page
.
getLimit
());
pagination
=
new
Pagination
();
pagination
.
setPageSize
(
10
);
page
=
PaginationUtils
.
INSTANCE
.
exchange
(
pagination
);
Assert
.
assertEquals
(
0
,
page
.
getFrom
());
Assert
.
assertEquals
(
10
,
page
.
getLimit
());
pagination
=
new
Pagination
();
pagination
=
new
Pagination
();
pagination
.
setPageSize
(
10
);
pagination
.
setPageSize
(
10
);
pagination
.
setPageNum
(
2
);
pagination
.
setPageNum
(
2
);
...
...
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
浏览文件 @
c9bb3411
...
@@ -6,6 +6,7 @@ type TraceBrief {
...
@@ -6,6 +6,7 @@ type TraceBrief {
# Trace basic info
# Trace basic info
type BasicTrace {
type BasicTrace {
segmentId: String!
operationName: String!
operationName: String!
duration: Int!
duration: Int!
start: String!
start: String!
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录