fix miss transform ref data for each span issue

This commit is contained in:
ascrutae 2017-12-14 10:43:00 +08:00
parent ad5fd07343
commit 9f4532c03b
2 changed files with 5 additions and 12 deletions

View File

@ -16,7 +16,6 @@
*
*/
package org.apache.skywalking.apm.agent.core.context.trace;
import java.util.LinkedList;
@ -280,6 +279,11 @@ public abstract class AbstractTracingSpan implements AbstractSpan {
spanBuilder.addLogs(log.transform());
}
}
if (this.refs != null) {
for (TraceSegmentRef ref : this.refs) {
spanBuilder.addRefs(ref.transform());
}
}
return spanBuilder;
}

View File

@ -19,7 +19,6 @@
package org.apache.skywalking.apm.agent.core.context.trace;
import org.apache.skywalking.apm.agent.core.dictionary.DictionaryUtil;
import org.apache.skywalking.apm.network.proto.SpanObject;
import org.apache.skywalking.apm.network.trace.component.Component;
/**
@ -127,16 +126,6 @@ public class EntrySpan extends StackBasedTracingSpan {
return false;
}
@Override public SpanObject.Builder transform() {
SpanObject.Builder builder = super.transform();
if (refs != null) {
for (TraceSegmentRef ref : refs) {
builder.addRefs(ref.transform());
}
}
return builder;
}
private void clearWhenRestart() {
this.componentId = DictionaryUtil.nullValue();
this.componentName = null;