Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
润土的好友猹
SkyWalking
提交
6e892508
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,发现更多精彩内容 >>
提交
6e892508
编写于
3月 06, 2018
作者:
彭
彭勇升 pengys
提交者:
wu-sheng
3月 06, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Get the MQ server address id from reference. (#891)
上级
f17f69b3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
4 deletion
+12
-4
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
+2
-3
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/test/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/service/SegmentBase64Printer.java
...segment/parser/provider/service/SegmentBase64Printer.java
+10
-1
未找到文件。
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
浏览文件 @
6e892508
...
...
@@ -80,9 +80,8 @@ public class ServiceReferenceMetricSpanListener implements FirstSpanListener, En
serviceReferenceMetric
.
setFrontServiceId
(
reference
.
getParentServiceId
());
if
(
spanDecorator
.
getSpanLayer
().
equals
(
SpanLayer
.
MQ
))
{
int
peerId
=
spanDecorator
.
getPeerId
();
int
applicationIdByPeerId
=
applicationCacheService
.
getApplicationIdByAddressId
(
peerId
);
int
instanceIdByPeerId
=
instanceCacheService
.
getInstanceIdByAddressId
(
applicationIdByPeerId
,
peerId
);
int
applicationIdByPeerId
=
applicationCacheService
.
getApplicationIdByAddressId
(
reference
.
getNetworkAddressId
());
int
instanceIdByPeerId
=
instanceCacheService
.
getInstanceIdByAddressId
(
applicationIdByPeerId
,
reference
.
getNetworkAddressId
());
serviceReferenceMetric
.
setFrontInstanceId
(
instanceIdByPeerId
);
serviceReferenceMetric
.
setFrontApplicationId
(
applicationIdByPeerId
);
}
else
{
...
...
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/test/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/service/SegmentBase64Printer.java
浏览文件 @
6e892508
...
...
@@ -35,7 +35,7 @@ public class SegmentBase64Printer {
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
SegmentBase64Printer
.
class
);
public
static
void
main
(
String
[]
args
)
throws
InvalidProtocolBufferException
{
String
segmentBase64
=
"CgwKCg
IBsv/x1L2vgBsSggEQ////////////ARirnsP1niwg9Z7D9Z4sOhhIMi9KREJJL0Nvbm5lY3Rpb24vY2xvc2VKDGxvY2FsaG9zdDotMVABWAFgBHoOCgdkYi50eXBlEgNzcWx6GQoLZGIuaW5zdGFuY2USCmRhdGFTb3VyY2V6DgoMZGIuc3RhdGVtZW50GP///////////wEgAg==
"
;
String
segmentBase64
=
"CgwKCg
MXjPKUga3WgBsSvAEIARiF7Jq1nywgp+yatZ8sKlASDAoKAnPAqKD5rNaAGxgBIAIqDjEyNy4wLjAuMTo5MDkyOAJCFC9zZW5kTWVzc2FnZS97Y291bnR9UhQvc2VuZE1lc3NhZ2Uve2NvdW50fTocS2Fma2EvVHJhY2UtdG9waWMtMS9Db25zdW1lclgEYBt6GwoJbXEuYnJva2VyEg4xMjcuMC4wLjE6OTA5MnoZCghtcS50b3BpYxINVHJhY2UtdG9waWMtMRImEP///////////wEY/+uatZ8sILTsmrWfLDD///////////8BUAIYAiAD
"
;
byte
[]
binarySegment
=
Base64
.
getDecoder
().
decode
(
segmentBase64
);
TraceSegmentObject
segmentObject
=
TraceSegmentObject
.
parseFrom
(
binarySegment
);
...
...
@@ -72,6 +72,15 @@ public class SegmentBase64Printer {
LOGGER
.
info
(
" reference:"
);
span
.
getRefsList
().
forEach
(
reference
->
{
LOGGER
.
info
(
" EntryApplicationInstanceId: {}"
,
reference
.
getEntryApplicationInstanceId
());
LOGGER
.
info
(
" EntryServiceId: {}"
,
reference
.
getEntryServiceId
());
LOGGER
.
info
(
" EntryServiceName: {}"
,
reference
.
getEntryServiceName
());
LOGGER
.
info
(
" ParentTraceSegmentId: {}"
,
reference
.
getParentTraceSegmentId
());
LOGGER
.
info
(
" ParentSpanId: {}"
,
reference
.
getParentSpanId
());
LOGGER
.
info
(
" ParentApplicationInstanceId: {}"
,
reference
.
getParentApplicationInstanceId
());
LOGGER
.
info
(
" ParentServiceId: {}"
,
reference
.
getParentServiceId
());
LOGGER
.
info
(
" ParentServiceName: {}"
,
reference
.
getParentServiceName
());
LOGGER
.
info
(
" NetworkAddressId: {}"
,
reference
.
getNetworkAddressId
());
LOGGER
.
info
(
" NetworkAddress: {}"
,
reference
.
getNetworkAddress
());
});
});
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录