未验证 提交 329e53ca 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Merge pull request #574 from zhangkewei/NPE

AgentStream NullPointerException with RemoteWorker
......@@ -60,6 +60,7 @@ public class NodeComponentSpanListener implements EntrySpanListener, ExitSpanLis
}
nodeComponent.setPeerId(spanDecorator.getPeerId());
nodeComponent.setPeer(Const.EMPTY_STRING);
id = id + Const.ID_SPLIT + nodeComponent.getPeerId();
nodeComponent.setId(id);
nodeComponents.add(nodeComponent);
......@@ -81,6 +82,7 @@ public class NodeComponentSpanListener implements EntrySpanListener, ExitSpanLis
}
nodeComponent.setPeerId(applicationId);
nodeComponent.setPeer(Const.EMPTY_STRING);
id = id + Const.ID_SPLIT + String.valueOf(applicationId);
nodeComponent.setId(id);
......
......@@ -51,6 +51,7 @@ public class NodeMappingSpanListener implements RefsListener, FirstSpanListener
NodeMappingDataDefine.NodeMapping nodeMapping = new NodeMappingDataDefine.NodeMapping();
nodeMapping.setApplicationId(applicationId);
nodeMapping.setAddressId(referenceDecorator.getNetworkAddressId());
nodeMapping.setAddress(Const.EMPTY_STRING);
String id = String.valueOf(applicationId) + Const.ID_SPLIT + String.valueOf(nodeMapping.getAddressId());
nodeMapping.setId(id);
nodeMappings.add(nodeMapping);
......
......@@ -53,6 +53,7 @@ public class NodeReferenceSpanListener implements EntrySpanListener, ExitSpanLis
NodeReferenceDataDefine.NodeReference nodeReference = new NodeReferenceDataDefine.NodeReference();
nodeReference.setFrontApplicationId(applicationId);
nodeReference.setBehindApplicationId(spanDecorator.getPeerId());
nodeReference.setBehindPeer(Const.EMPTY_STRING);
nodeReference.setTimeBucket(TimeBucketUtils.INSTANCE.getMinuteTimeBucket(spanDecorator.getStartTime()));
StringBuilder idBuilder = new StringBuilder();
......@@ -79,6 +80,7 @@ public class NodeReferenceSpanListener implements EntrySpanListener, ExitSpanLis
NodeReferenceDataDefine.NodeReference nodeReference = new NodeReferenceDataDefine.NodeReference();
nodeReference.setFrontApplicationId(Const.USER_ID);
nodeReference.setBehindApplicationId(applicationId);
nodeReference.setBehindPeer(Const.EMPTY_STRING);
nodeReference.setTimeBucket(TimeBucketUtils.INSTANCE.getMinuteTimeBucket(spanDecorator.getStartTime()));
String idBuilder = String.valueOf(nodeReference.getTimeBucket()) + Const.ID_SPLIT + nodeReference.getFrontApplicationId() +
......@@ -96,6 +98,7 @@ public class NodeReferenceSpanListener implements EntrySpanListener, ExitSpanLis
NodeReferenceDataDefine.NodeReference referenceSum = new NodeReferenceDataDefine.NodeReference();
referenceSum.setFrontApplicationId(parentApplicationId);
referenceSum.setBehindApplicationId(applicationId);
referenceSum.setBehindPeer(Const.EMPTY_STRING);
references.add(referenceSum);
}
......
......@@ -127,12 +127,15 @@ public class ServiceReferenceSpanListener implements FirstSpanListener, EntrySpa
idBuilder.append(entryServiceId).append(Const.ID_SPLIT);
serviceReference.setEntryServiceId(entryServiceId);
serviceReference.setEntryServiceName(Const.EMPTY_STRING);
idBuilder.append(frontServiceId).append(Const.ID_SPLIT);
serviceReference.setFrontServiceId(frontServiceId);
serviceReference.setFrontServiceName(Const.EMPTY_STRING);
idBuilder.append(behindServiceId);
serviceReference.setBehindServiceId(behindServiceId);
serviceReference.setBehindServiceName(Const.EMPTY_STRING);
serviceReference.setId(idBuilder.toString());
serviceReference.setTimeBucket(timeBucket);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册