wu-sheng commented on a change in pull request #6715:
URL: https://github.com/apache/skywalking/pull/6715#discussion_r611037366
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/TraceSegment.java
##########
@@ -86,19 +70,14 @@ public TraceSegment() {
* @param refSegment {@link TraceSegmentRef}
*/
public void ref(TraceSegmentRef refSegment) {
- if (refs == null) {
- refs = new LinkedList<>();
- }
- if (!refs.contains(refSegment)) {
- refs.add(refSegment);
- }
+ this.traceSegmentRef = refSegment;
}
/**
- * Establish the line between this segment and all relative global trace
ids.
+ * Establish the line between this segment and the relative global trace
id.
*/
- public void relatedGlobalTraces(DistributedTraceId distributedTraceId) {
- relatedGlobalTraces.append(distributedTraceId);
+ public void relatedGlobalTrace(DistributedTraceId distributedTraceId) {
+ this.relatedGlobalTraceId = distributedTraceId;
Review comment:
Check how old logic works, this overriding is incorrect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]