wu-sheng closed pull request #1175: Fix Parent Application Instance Id is 0
URL: https://github.com/apache/incubator-skywalking/pull/1175
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java
 
b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java
index 78981a351..d51362958 100644
--- 
a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java
+++ 
b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java
@@ -123,7 +123,6 @@ public TraceSegmentReference transform() {
         TraceSegmentReference.Builder refBuilder = 
TraceSegmentReference.newBuilder();
         if (SegmentRefType.CROSS_PROCESS.equals(type)) {
             refBuilder.setRefType(RefType.CrossProcess);
-            
refBuilder.setParentApplicationInstanceId(parentApplicationInstanceId);
             if (peerId == DictionaryUtil.nullValue()) {
                 refBuilder.setNetworkAddress(peerHost);
             } else {
@@ -133,6 +132,7 @@ public TraceSegmentReference transform() {
             refBuilder.setRefType(RefType.CrossThread);
         }
 
+        refBuilder.setParentApplicationInstanceId(parentApplicationInstanceId);
         refBuilder.setEntryApplicationInstanceId(entryApplicationInstanceId);
         refBuilder.setParentTraceSegmentId(traceSegmentId.transform());
         refBuilder.setParentSpanId(spanId);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to