diff --git a/apm-network/src/main/proto/TraceSegmentService.proto b/apm-network/src/main/proto/TraceSegmentService.proto index 315165ebe..62a1b16cb 100644 --- a/apm-network/src/main/proto/TraceSegmentService.proto +++ b/apm-network/src/main/proto/TraceSegmentService.proto @@ -33,6 +33,8 @@ message TraceSegmentReference { int32 networkAddressId = 6; string entryServiceName = 7; int32 entryServiceId = 8; + string parentServiceName = 9; + int32 parentServiceId = 10; } message SpanObject { diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextCarrier.java b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextCarrier.java index 0d44d305e..9ea1cc761 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextCarrier.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextCarrier.java @@ -28,6 +28,8 @@ public class ContextCarrier implements Serializable { private String entryOperationName; + private String parentOperationName; + /** * {@link DistributedTraceId} */ @@ -47,7 +49,8 @@ public class ContextCarrier implements Serializable { this.getApplicationInstanceId() + "", this.getPeerHost(), this.getEntryOperationName(), - this.serializeDistributedTraceId()); + this.getParentOperationName(), + this.getPrimaryDistributedTraceId()); } else { return ""; } @@ -60,15 +63,16 @@ public class ContextCarrier implements Serializable { */ public ContextCarrier deserialize(String text) { if (text != null) { - String[] parts = text.split("\\|", 6); - if (parts.length == 6) { + String[] parts = text.split("\\|", 7); + if (parts.length == 7) { try { this.traceSegmentId = parts[0]; this.spanId = Integer.parseInt(parts[1]); this.applicationInstanceId = Integer.parseInt(parts[2]); this.peerHost = parts[3]; this.entryOperationName = parts[4]; - this.primaryDistributedTraceId = new PropagatedTraceId(parts[5]); + this.parentOperationName = parts[5]; + this.primaryDistributedTraceId = new PropagatedTraceId(parts[6]); } catch (NumberFormatException e) { } @@ -88,6 +92,7 @@ public class ContextCarrier implements Serializable { && applicationInstanceId != DictionaryUtil.nullValue() && !StringUtil.isEmpty(peerHost) && !StringUtil.isEmpty(entryOperationName) + && !StringUtil.isEmpty(parentOperationName) && primaryDistributedTraceId != null; } @@ -103,6 +108,14 @@ public class ContextCarrier implements Serializable { this.entryOperationName = entryOperationId + ""; } + void setParentOperationName(String parentOperationName) { + this.parentOperationName = '#' + parentOperationName; + } + + void setParentOperationId(int parentOperationId) { + this.parentOperationName = parentOperationId + ""; + } + public String getTraceSegmentId() { return traceSegmentId; } @@ -147,7 +160,11 @@ public class ContextCarrier implements Serializable { this.primaryDistributedTraceId = distributedTraceIds.get(0); } - private String serializeDistributedTraceId() { + private String getPrimaryDistributedTraceId() { return primaryDistributedTraceId.toString(); } + + public String getParentOperationName() { + return parentOperationName; + } } diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextSnapshot.java b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextSnapshot.java index 4be37bf07..7542b5320 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextSnapshot.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/ContextSnapshot.java @@ -2,7 +2,6 @@ package org.skywalking.apm.agent.core.context; import java.util.List; import org.skywalking.apm.agent.core.context.ids.DistributedTraceId; -import org.skywalking.apm.agent.core.dictionary.DictionaryUtil; import org.skywalking.apm.util.StringUtil; /** @@ -24,24 +23,38 @@ public class ContextSnapshot { private String entryOperationName; + private String parentOperationName; + /** * {@link DistributedTraceId} */ private DistributedTraceId primaryDistributedTraceId; ContextSnapshot(String traceSegmentId, int spanId, - List distributedTraceIds, int entryServiceId, String entryOperationName) { + List distributedTraceIds) { this.traceSegmentId = traceSegmentId; this.spanId = spanId; - this.primaryDistributedTraceId = distributedTraceIds.get(0); - - if (entryServiceId == DictionaryUtil.nullValue()) { - this.entryOperationName = "#" + entryOperationName; - } else { - this.entryOperationName = String.valueOf(entryServiceId); + if (distributedTraceIds != null) { + this.primaryDistributedTraceId = distributedTraceIds.get(0); } } + public void setEntryOperationName(String entryOperationName) { + this.entryOperationName = "#" + entryOperationName; + } + + public void setEntryOperationId(int entryOperationId) { + this.entryOperationName = entryOperationId + ""; + } + + public void setParentOperationName(String parentOperationName) { + this.parentOperationName = "#" + parentOperationName; + } + + public void setParentOperationId(int parentOperationId) { + this.parentOperationName = parentOperationId + ""; + } + public DistributedTraceId getDistributedTraceId() { return primaryDistributedTraceId; } @@ -54,11 +67,16 @@ public class ContextSnapshot { return spanId; } + public String getParentOperationName() { + return parentOperationName; + } + public boolean isValid() { return traceSegmentId != null && spanId > -1 && primaryDistributedTraceId != null - && !StringUtil.isEmpty(entryOperationName); + && !StringUtil.isEmpty(entryOperationName) + && !StringUtil.isEmpty(parentOperationName); } public String getEntryOperationName() { diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/IgnoredTracerContext.java b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/IgnoredTracerContext.java index 6f3e0ce51..4ad37e361 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/IgnoredTracerContext.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/IgnoredTracerContext.java @@ -33,7 +33,7 @@ public class IgnoredTracerContext implements AbstractTracerContext { } @Override public ContextSnapshot capture() { - return new ContextSnapshot(null, -1, null, 0, null); + return new ContextSnapshot(null, -1, null); } @Override public void continued(ContextSnapshot snapshot) { diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/TracingContext.java b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/TracingContext.java index d302c8460..b054025f8 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/TracingContext.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/TracingContext.java @@ -96,8 +96,8 @@ public class TracingContext implements AbstractTracerContext { String operationName; if (refs != null && refs.size() > 0) { TraceSegmentRef ref = refs.get(0); - operationId = ref.getOperationId(); - operationName = ref.getOperationName(); + operationId = ref.getEntryOperationId(); + operationName = ref.getEntryOperationName(); } else { AbstractTracingSpan firstSpan = first(); operationId = firstSpan.getOperationId(); @@ -109,6 +109,13 @@ public class TracingContext implements AbstractTracerContext { carrier.setEntryOperationId(operationId); } + int parentOperationId = first().getOperationId(); + if (parentOperationId == DictionaryUtil.nullValue()) { + carrier.setParentOperationName(first().getOperationName()); + } else { + carrier.setParentOperationId(parentOperationId); + } + carrier.setDistributedTraceIds(this.segment.getRelatedGlobalTraces()); } @@ -133,19 +140,32 @@ public class TracingContext implements AbstractTracerContext { @Override public ContextSnapshot capture() { List refs = this.segment.getRefs(); + ContextSnapshot snapshot = new ContextSnapshot(segment.getTraceSegmentId(), + activeSpan().getSpanId(), + segment.getRelatedGlobalTraces()); + int entryOperationId; + String entryOperationName; + AbstractTracingSpan firstSpan = first(); if (refs != null && refs.size() > 0) { TraceSegmentRef ref = refs.get(0); - return new ContextSnapshot(segment.getTraceSegmentId(), - activeSpan().getSpanId(), - segment.getRelatedGlobalTraces(), ref.getOperationId(), ref.getOperationName() - ); + entryOperationId = ref.getEntryOperationId(); + entryOperationName = ref.getEntryOperationName(); } else { - AbstractTracingSpan firstSpan = first(); - return new ContextSnapshot(segment.getTraceSegmentId(), - activeSpan().getSpanId(), - segment.getRelatedGlobalTraces(), firstSpan.getOperationId(), firstSpan.getOperationName() - ); + entryOperationId = firstSpan.getOperationId(); + entryOperationName = firstSpan.getOperationName(); } + if (entryOperationId == DictionaryUtil.nullValue()) { + snapshot.setEntryOperationName(entryOperationName); + } else { + snapshot.setEntryOperationId(entryOperationId); + } + + if (firstSpan.getOperationId() == DictionaryUtil.nullValue()) { + snapshot.setParentOperationName(firstSpan.getOperationName()); + } else { + snapshot.setParentOperationId(firstSpan.getOperationId()); + } + return snapshot; } /** diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java index efe1de2de..0b71f9db3 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java @@ -25,9 +25,13 @@ public class TraceSegmentRef { private int peerId = DictionaryUtil.nullValue(); - private String operationName; + private String entryOperationName; - private int operationId = DictionaryUtil.nullValue(); + private int entryOperationId = DictionaryUtil.nullValue(); + + private String parentOperationName; + + private int parentOperationId = DictionaryUtil.nullValue(); /** * Transform a {@link ContextCarrier} to the TraceSegmentRef @@ -47,9 +51,15 @@ public class TraceSegmentRef { } String entryOperationName = carrier.getEntryOperationName(); if (entryOperationName.charAt(0) == '#') { - this.operationName = entryOperationName.substring(1); + this.entryOperationName = entryOperationName.substring(1); } else { - this.operationId = Integer.parseInt(entryOperationName); + this.entryOperationId = Integer.parseInt(entryOperationName); + } + String parentOperationName = carrier.getParentOperationName(); + if (parentOperationName.charAt(0) == '#') { + this.parentOperationName = parentOperationName.substring(1); + } else { + this.parentOperationId = Integer.parseInt(parentOperationName); } } @@ -59,18 +69,24 @@ public class TraceSegmentRef { this.spanId = snapshot.getSpanId(); String entryOperationName = snapshot.getEntryOperationName(); if (entryOperationName.charAt(0) == '#') { - this.operationName = entryOperationName.substring(1); + this.entryOperationName = entryOperationName.substring(1); } else { - this.operationId = Integer.parseInt(entryOperationName); + this.entryOperationId = Integer.parseInt(entryOperationName); + } + String parentOperationName = snapshot.getParentOperationName(); + if (parentOperationName.charAt(0) == '#') { + this.parentOperationName = parentOperationName.substring(1); + } else { + this.parentOperationId = Integer.parseInt(parentOperationName); } } - public String getOperationName() { - return operationName; + public String getEntryOperationName() { + return entryOperationName; } - public int getOperationId() { - return operationId; + public int getEntryOperationId() { + return entryOperationId; } public TraceSegmentReference transform() { @@ -89,10 +105,15 @@ public class TraceSegmentRef { refBuilder.setParentTraceSegmentId(traceSegmentId); refBuilder.setParentSpanId(spanId); - if (operationId == DictionaryUtil.nullValue()) { - refBuilder.setEntryServiceName(operationName); + if (entryOperationId == DictionaryUtil.nullValue()) { + refBuilder.setEntryServiceName(entryOperationName); } else { - refBuilder.setEntryServiceId(operationId); + refBuilder.setEntryServiceId(entryOperationId); + } + if (parentOperationId == DictionaryUtil.nullValue()) { + refBuilder.setParentServiceName(parentOperationName); + } else { + refBuilder.setParentServiceId(parentOperationId); } return refBuilder.build(); } diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/ContextManagerTest.java b/apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/ContextManagerTest.java index 0c488efa5..57516139f 100644 --- a/apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/ContextManagerTest.java +++ b/apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/ContextManagerTest.java @@ -1,15 +1,12 @@ package org.skywalking.apm.agent.core.context; -import com.google.instrumentation.trace.Span; import com.google.protobuf.InvalidProtocolBufferException; import java.util.List; import org.junit.After; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; -import org.skywalking.apm.agent.core.boot.ServiceManager; import org.skywalking.apm.agent.core.conf.RemoteDownstreamConfig; import org.skywalking.apm.agent.core.context.tag.Tags; import org.skywalking.apm.agent.core.context.trace.AbstractSpan; @@ -82,7 +79,7 @@ public class ContextManagerTest { @Test public void createMultipleEntrySpan() { - ContextCarrier contextCarrier = new ContextCarrier().deserialize("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|T.1499176688386.581928182.80935.69.2"); + ContextCarrier contextCarrier = new ContextCarrier().deserialize("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|#/portal/|T.1499176688386.581928182.80935.69.2"); assertTrue(contextCarrier.isValid()); AbstractSpan firstEntrySpan = ContextManager.createEntrySpan("/testFirstEntry", contextCarrier); @@ -115,8 +112,8 @@ public class ContextManagerTest { TraceSegmentRef ref = actualSegment.getRefs().get(0); assertThat(TraceSegmentRefHelper.getPeerHost(ref), is("192.168.1.8 :18002")); - assertThat(ref.getOperationName(), is("/portal/")); - assertThat(ref.getOperationId(), is(0)); + assertThat(ref.getEntryOperationName(), is("/portal/")); + assertThat(ref.getEntryOperationId(), is(0)); List spanList = SegmentHelper.getSpan(actualSegment); assertThat(spanList.size(), is(2)); @@ -205,7 +202,7 @@ public class ContextManagerTest { @Test public void testTransform() throws InvalidProtocolBufferException { - ContextCarrier contextCarrier = new ContextCarrier().deserialize("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|T.1499176688386.581928182.80935.69.2"); + ContextCarrier contextCarrier = new ContextCarrier().deserialize("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|#/portal/|T.1499176688386.581928182.80935.69.2"); assertTrue(contextCarrier.isValid()); AbstractSpan firstEntrySpan = ContextManager.createEntrySpan("/testFirstEntry", contextCarrier); diff --git a/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/test/java/org/skywalking/apm/plugin/dubbo/DubboInterceptorTest.java b/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/test/java/org/skywalking/apm/plugin/dubbo/DubboInterceptorTest.java index c8dd580ba..b9c9ebd9d 100644 --- a/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/test/java/org/skywalking/apm/plugin/dubbo/DubboInterceptorTest.java +++ b/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/test/java/org/skywalking/apm/plugin/dubbo/DubboInterceptorTest.java @@ -148,7 +148,7 @@ public class DubboInterceptorTest { @Test public void testProviderWithAttachment() throws Throwable { when(rpcContext.isConsumerSide()).thenReturn(false); - when(rpcContext.getAttachment(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|T.1499176688386.581928182.80935.69.2"); + when(rpcContext.getAttachment(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|#/portal/|T.1499176688386.581928182.80935.69.2"); dubboInterceptor.beforeMethod(enhancedInstance, "invoke", allArguments, argumentTypes, methodInterceptResult); dubboInterceptor.afterMethod(enhancedInstance, "invoke", allArguments, argumentTypes, result); @@ -160,7 +160,7 @@ public class DubboInterceptorTest { when(rpcContext.isConsumerSide()).thenReturn(false); FieldSetter.setStaticValue(BugFixActive.class, "ACTIVE", true); - testParam.setTraceContext("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|T.1499176688386.581928182.80935.69.2"); + testParam.setTraceContext("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8 :18002|#/portal/|#/portal/|T.1499176688386.581928182.80935.69.2"); dubboInterceptor.beforeMethod(enhancedInstance, "invoke", allArguments, argumentTypes, methodInterceptResult); dubboInterceptor.afterMethod(enhancedInstance, "invoke", allArguments, argumentTypes, result); diff --git a/apm-sniffer/apm-sdk-plugin/motan-plugin/src/test/java/org/skywalking/apm/plugin/motan/MotanProviderInterceptorTest.java b/apm-sniffer/apm-sdk-plugin/motan-plugin/src/test/java/org/skywalking/apm/plugin/motan/MotanProviderInterceptorTest.java index dffaa628d..0e533a873 100644 --- a/apm-sniffer/apm-sdk-plugin/motan-plugin/src/test/java/org/skywalking/apm/plugin/motan/MotanProviderInterceptorTest.java +++ b/apm-sniffer/apm-sdk-plugin/motan-plugin/src/test/java/org/skywalking/apm/plugin/motan/MotanProviderInterceptorTest.java @@ -91,7 +91,7 @@ public class MotanProviderInterceptorTest { @Test public void testInvokerWithRefSegment() throws Throwable { HashMap attachments = new HashMap(); - attachments.put(Config.Plugin.Propagation.HEADER_NAME, "S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|T.1499176688386.581928182.80935.69.2"); + attachments.put(Config.Plugin.Propagation.HEADER_NAME, "S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|#/portal/|T.1499176688386.581928182.80935.69.2"); when(request.getAttachments()).thenReturn(attachments); invokeInterceptor.beforeMethod(enhancedInstance, "execute", arguments, argumentType, null); diff --git a/apm-sniffer/apm-sdk-plugin/resin-3.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v3/ResinV3InterceptorTest.java b/apm-sniffer/apm-sdk-plugin/resin-3.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v3/ResinV3InterceptorTest.java index 2019dff0d..d44914909 100644 --- a/apm-sniffer/apm-sdk-plugin/resin-3.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v3/ResinV3InterceptorTest.java +++ b/apm-sniffer/apm-sdk-plugin/resin-3.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v3/ResinV3InterceptorTest.java @@ -90,7 +90,7 @@ public class ResinV3InterceptorTest { @Test public void testWithSerializedContextData() throws Throwable { - when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|T.1499176688386.581928182.80935.69.2"); + when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|#/portal/|T.1499176688386.581928182.80935.69.2"); interceptor.beforeMethod(enhancedInstance, "service", arguments, argumentType, methodInterceptResult); interceptor.afterMethod(enhancedInstance, "service", arguments, argumentType, null); diff --git a/apm-sniffer/apm-sdk-plugin/resin-4.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v4/ResinV4InterceptorTest.java b/apm-sniffer/apm-sdk-plugin/resin-4.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v4/ResinV4InterceptorTest.java index 1256dba6d..959a74323 100644 --- a/apm-sniffer/apm-sdk-plugin/resin-4.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v4/ResinV4InterceptorTest.java +++ b/apm-sniffer/apm-sdk-plugin/resin-4.x-plugin/src/test/java/org/skywalking/apm/plugin/resin/v4/ResinV4InterceptorTest.java @@ -92,7 +92,7 @@ public class ResinV4InterceptorTest { @Test public void testWithSerializedContextData() throws Throwable { - when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|T.1499176688386.581928182.80935.69.2"); + when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|#/portal/|T.1499176688386.581928182.80935.69.2"); interceptor.beforeMethod(enhancedInstance, "service", arguments, argumentType, methodInterceptResult); interceptor.afterMethod(enhancedInstance, "service", arguments, argumentType, null); diff --git a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/test/java/org/skywalking/apm/plugin/tomcat78x/TomcatInterceptorTest.java b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/test/java/org/skywalking/apm/plugin/tomcat78x/TomcatInterceptorTest.java index f9bfbe738..9e0ca21ee 100644 --- a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/test/java/org/skywalking/apm/plugin/tomcat78x/TomcatInterceptorTest.java +++ b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/test/java/org/skywalking/apm/plugin/tomcat78x/TomcatInterceptorTest.java @@ -82,7 +82,7 @@ public class TomcatInterceptorTest { @Test public void testWithSerializedContextData() throws Throwable { - when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|T.1499176688386.581928182.80935.69.2"); + when(request.getHeader(Config.Plugin.Propagation.HEADER_NAME)).thenReturn("S.1499176688384.581928182.80935.69.1|3|1|#192.168.1.8:18002|#/portal/|#/portal/|T.1499176688386.581928182.80935.69.2"); tomcatInterceptor.beforeMethod(enhancedInstance, "invoke", arguments, argumentType, methodInterceptResult); tomcatInterceptor.afterMethod(enhancedInstance, "invoke", arguments, argumentType, null); diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-opentracing-activation/src/test/java/org/skywalking/apm/toolkit/activation/opentracing/SkywalkingSpanActivationTest.java b/apm-sniffer/apm-toolkit-activation/apm-toolkit-opentracing-activation/src/test/java/org/skywalking/apm/toolkit/activation/opentracing/SkywalkingSpanActivationTest.java index 279ffb7b7..5d21ba088 100644 --- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-opentracing-activation/src/test/java/org/skywalking/apm/toolkit/activation/opentracing/SkywalkingSpanActivationTest.java +++ b/apm-sniffer/apm-toolkit-activation/apm-toolkit-opentracing-activation/src/test/java/org/skywalking/apm/toolkit/activation/opentracing/SkywalkingSpanActivationTest.java @@ -181,7 +181,7 @@ public class SkywalkingSpanActivationTest { .withTag(Tags.PEER_HOST_IPV4.getKey(), "127.0.0.1").withTag(Tags.PEER_PORT.getKey(), 8080); startSpan(); extractInterceptor.afterMethod(enhancedInstance, "extract", - new Object[] {"S.1499746282749.1100157028.88023.1.1|0|1|#127.0.0.1:8080|#testOperationName|T.1499746282768.1100157028.88023.1.2"}, new Class[] {String.class}, null); + new Object[] {"S.1499746282749.1100157028.88023.1.1|0|1|#127.0.0.1:8080|#testOperationName|#testOperationName|T.1499746282768.1100157028.88023.1.2"}, new Class[] {String.class}, null); stopSpan(); TraceSegment tracingSegment = assertTraceSemgnets();