From e1aad420db3f62196d6de114e23b18405ec3c66b Mon Sep 17 00:00:00 2001 From: 844067874 <844067874@qq.com> Date: Mon, 28 Jun 2021 18:55:27 +0800 Subject: [PATCH] fix the response time of gRPC is not right. (#7179) --- CHANGES.md | 1 + .../grpc/v1/server/ServerInterceptor.java | 17 +- .../grpc/v1/server/TracingServerCall.java | 11 +- .../v1/server/TracingServerCallListener.java | 39 +- .../config/expectedData.yaml | 15 - .../grpc-scenario/config/expectedData.yaml | 868 +++++++++--------- 6 files changed, 459 insertions(+), 492 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5956f91f7..6b98b20f1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ Release Notes. * Remove deprecated gRPC method, `io.grpc.ManagedChannelBuilder#nameResolverFactory`. See [gRPC-java 7133](https://github.com/grpc/grpc-java/issues/7133) for more details. * Add `Neo4j-4.x` plugin. * Correct `profile.duration` to `profile.max_duration` in the default `agent.config` file. +* Fix the reponse time of gRPC. #### OAP-Backend * Disable Spring sleuth meter analyzer by default. diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/ServerInterceptor.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/ServerInterceptor.java index 6b900d360..e5c94fbf6 100644 --- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/ServerInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/ServerInterceptor.java @@ -23,11 +23,6 @@ import io.grpc.ServerCall; import io.grpc.ServerCallHandler; import org.apache.skywalking.apm.agent.core.context.CarrierItem; import org.apache.skywalking.apm.agent.core.context.ContextCarrier; -import org.apache.skywalking.apm.agent.core.context.ContextManager; -import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan; -import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer; -import org.apache.skywalking.apm.network.trace.component.ComponentsDefine; -import org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil; import org.apache.skywalking.apm.util.StringUtil; public class ServerInterceptor implements io.grpc.ServerInterceptor { @@ -43,15 +38,7 @@ public class ServerInterceptor implements io.grpc.ServerInterceptor { next.setHeadValue(contextValue); } } - - final AbstractSpan span = ContextManager.createEntrySpan(OperationNameFormatUtil.formatOperationName(call.getMethodDescriptor()), contextCarrier); - span.setComponent(ComponentsDefine.GRPC); - span.setLayer(SpanLayer.RPC_FRAMEWORK); - try { - return new TracingServerCallListener<>(handler.startCall(new TracingServerCall<>(call, ContextManager.capture()), headers), call - .getMethodDescriptor(), ContextManager.capture()); - } finally { - ContextManager.stopSpan(); - } + return new TracingServerCallListener<>(handler.startCall(new TracingServerCall<>(call), headers), call + .getMethodDescriptor(), contextCarrier); } } diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java index 195535eca..d5543466d 100644 --- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java +++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java @@ -23,26 +23,22 @@ import io.grpc.Metadata; import io.grpc.ServerCall; import io.grpc.Status; import org.apache.skywalking.apm.agent.core.context.ContextManager; -import org.apache.skywalking.apm.agent.core.context.ContextSnapshot; import org.apache.skywalking.apm.agent.core.context.tag.Tags; import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan; import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer; import org.apache.skywalking.apm.network.trace.component.ComponentsDefine; -import org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil; - import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_CLOSE_OPERATION_NAME; import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_MESSAGE_OPERATION_NAME; import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.SERVER; +import org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil; public class TracingServerCall extends ForwardingServerCall.SimpleForwardingServerCall { private final String operationPrefix; - private final ContextSnapshot contextSnapshot; - protected TracingServerCall(ServerCall delegate, ContextSnapshot contextSnapshot) { + protected TracingServerCall(ServerCall delegate) { super(delegate); this.operationPrefix = OperationNameFormatUtil.formatOperationName(delegate.getMethodDescriptor()) + SERVER; - this.contextSnapshot = contextSnapshot; } @Override @@ -52,7 +48,6 @@ public class TracingServerCall extends ForwardingServerCall.S final AbstractSpan span = ContextManager.createLocalSpan(operationPrefix + RESPONSE_ON_MESSAGE_OPERATION_NAME); span.setComponent(ComponentsDefine.GRPC); span.setLayer(SpanLayer.RPC_FRAMEWORK); - ContextManager.continued(contextSnapshot); try { super.sendMessage(message); @@ -72,7 +67,6 @@ public class TracingServerCall extends ForwardingServerCall.S final AbstractSpan span = ContextManager.createLocalSpan(operationPrefix + RESPONSE_ON_CLOSE_OPERATION_NAME); span.setComponent(ComponentsDefine.GRPC); span.setLayer(SpanLayer.RPC_FRAMEWORK); - ContextManager.continued(contextSnapshot); switch (status.getCode()) { case OK: break; @@ -108,4 +102,5 @@ public class TracingServerCall extends ForwardingServerCall.S ContextManager.stopSpan(); } } + } diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java index 231bdd4cf..988f72b4c 100644 --- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java +++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java @@ -21,30 +21,33 @@ package org.apache.skywalking.apm.plugin.grpc.v1.server; import io.grpc.ForwardingServerCallListener; import io.grpc.MethodDescriptor; import io.grpc.ServerCall; +import org.apache.skywalking.apm.agent.core.context.ContextCarrier; import org.apache.skywalking.apm.agent.core.context.ContextManager; import org.apache.skywalking.apm.agent.core.context.ContextSnapshot; import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan; import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer; import org.apache.skywalking.apm.network.trace.component.ComponentsDefine; -import org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil; - import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_CANCEL_OPERATION_NAME; import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_COMPLETE_OPERATION_NAME; import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_MESSAGE_OPERATION_NAME; import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.SERVER; +import org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil; public class TracingServerCallListener extends ForwardingServerCallListener.SimpleForwardingServerCallListener { - - private final ContextSnapshot contextSnapshot; private final MethodDescriptor.MethodType methodType; private final String operationPrefix; + private final String operation; + private final ContextCarrier contextCarrier; - protected TracingServerCallListener(ServerCall.Listener delegate, MethodDescriptor descriptor, - ContextSnapshot contextSnapshot) { + private AbstractSpan asyncSpan; + private ContextSnapshot contextSnapshot; + + protected TracingServerCallListener(ServerCall.Listener delegate, MethodDescriptor descriptor, ContextCarrier contextCarrier) { super(delegate); - this.contextSnapshot = contextSnapshot; this.methodType = descriptor.getType(); this.operationPrefix = OperationNameFormatUtil.formatOperationName(descriptor) + SERVER; + this.operation = OperationNameFormatUtil.formatOperationName(descriptor); + this.contextCarrier = contextCarrier; } @Override @@ -74,7 +77,6 @@ public class TracingServerCallListener extends ForwardingServerCallList span.setComponent(ComponentsDefine.GRPC); span.setLayer(SpanLayer.RPC_FRAMEWORK); ContextManager.continued(contextSnapshot); - try { super.onCancel(); } catch (Throwable t) { @@ -91,7 +93,6 @@ public class TracingServerCallListener extends ForwardingServerCallList span.setComponent(ComponentsDefine.GRPC); span.setLayer(SpanLayer.RPC_FRAMEWORK); ContextManager.continued(contextSnapshot); - try { super.onHalfClose(); } catch (Throwable t) { @@ -101,4 +102,22 @@ public class TracingServerCallListener extends ForwardingServerCallList ContextManager.stopSpan(); } } -} + + @Override + public void onComplete() { + super.onComplete(); + asyncSpan.asyncFinish(); + } + + @Override + public void onReady() { + final AbstractSpan span = ContextManager.createEntrySpan(operation, contextCarrier); + span.setComponent(ComponentsDefine.GRPC); + span.setLayer(SpanLayer.RPC_FRAMEWORK); + contextSnapshot = ContextManager.capture(); + asyncSpan = span.prepareForAsync(); + ContextManager.stopSpan(asyncSpan); + + super.onReady(); + } +} \ No newline at end of file diff --git a/test/plugin/scenarios/correlation-autotag-scenario/config/expectedData.yaml b/test/plugin/scenarios/correlation-autotag-scenario/config/expectedData.yaml index b0aa6349c..3c39f92df 100644 --- a/test/plugin/scenarios/correlation-autotag-scenario/config/expectedData.yaml +++ b/test/plugin/scenarios/correlation-autotag-scenario/config/expectedData.yaml @@ -150,11 +150,6 @@ segmentItems: spanType: Local peer: '' skipAnalysis: false - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, - parentServiceInstance: not null, parentService: correlation-autotag-scenario, - traceId: not null} - operationName: Greeter.sayHello/server/Request/onMessage operationId: 0 parentSpanId: -1 @@ -186,11 +181,6 @@ segmentItems: spanType: Local peer: '' skipAnalysis: false - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, - parentServiceInstance: not null, parentService: correlation-autotag-scenario, - traceId: not null} - operationName: Greeter.sayHello/server/Request/onMessage operationId: 0 parentSpanId: -1 @@ -224,11 +214,6 @@ segmentItems: skipAnalysis: false tags: - {key: status_code, value: OK} - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, - parentServiceInstance: not null, parentService: correlation-autotag-scenario, - traceId: not null} - operationName: Greeter.sayHello/server/Request/onComplete operationId: 0 parentSpanId: -1 diff --git a/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml b/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml index 4a46b5262..28258edbf 100644 --- a/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml +++ b/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml @@ -14,448 +14,428 @@ # See the License for the specific language governing permissions and # limitations under the License. segmentItems: -- serviceName: grpc-scenario - segmentSize: gt 10 - segments: - - segmentId: not null - spans: - - operationName: GreeterBlocking.sayHello - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Entry - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '127.0.0.1:18080', - refType: CrossProcess, parentSpanId: 2, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/client/Request/onMessage - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, - parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: not null, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/client/Request/onMessage - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, - parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/client/Request/onComplete - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, - parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Entry - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '127.0.0.1:18080', - refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/server/Response/onMessage - operationId: 0 - parentSpanId: 0 - spanId: 1 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: not null, traceId: not null} - skipAnalysis: 'false' - - operationName: Greeter.sayHello/server/Request/onMessage - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: not null, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/client/Response/onMessage - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, - parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: not null, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: GreeterBlocking.sayHello/server/Response/onClose - operationId: 0 - parentSpanId: 0 - spanId: 1 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - tags: - - {key: status_code, value: OK} - refs: - - {parentEndpoint: GreeterBlocking.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - operationName: GreeterBlocking.sayHello/server/Request/onComplete - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: GreeterBlocking.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/server/Response/onMessage - operationId: 0 - parentSpanId: 0 - spanId: 1 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - operationName: Greeter.sayHello/server/Request/onMessage - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/server/Response/onClose - operationId: 0 - parentSpanId: 0 - spanId: 1 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - tags: - - {key: status_code, value: OK} - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - operationName: Greeter.sayHello/server/Request/onComplete - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/client/Response/onMessage - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, - parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: Greeter.sayHello/client/Response/onClose - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, - parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: GreeterBlockingError.sayHello - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Entry - peer: '' - refs: - - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '127.0.0.1:18080', - refType: CrossProcess, parentSpanId: 5, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - operationName: GreeterBlockingError.sayHello/server/Response/onClose - operationId: 0 - parentSpanId: 0 - spanId: 1 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: true - spanType: Local - peer: '' - tags: - - {key: status_code, value: UNKNOWN} - logs: - - logEvent: - - {key: event, value: error} - - {key: error.kind, value: java.lang.Exception} - - {key: message, value: ''} - - {key: stack, value: not null} - refs: - - {parentEndpoint: GreeterBlockingError.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - operationName: GreeterBlockingError.sayHello/server/Request/onComplete - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: false - spanType: Local - peer: '' - refs: - - {parentEndpoint: GreeterBlockingError.sayHello, networkAddress: '', refType: CrossThread, - parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not - null, parentService: grpc-scenario, traceId: not null} - skipAnalysis: 'false' - - segmentId: not null - spans: - - {operationName: Greeter.sayHello, operationId: 0, parentSpanId: 0, spanId: 1, - spanLayer: RPCFramework, startTime: nq 0, endTime: nq 0, componentId: 23, isError: false, - spanType: Exit, peer: '127.0.0.1:18080', skipAnalysis: 'false'} - - {operationName: GreeterBlocking.sayHello/client/Request/onComplete, operationId: 0, - parentSpanId: 2, spanId: 3, spanLayer: RPCFramework, startTime: nq 0, endTime: nq - 0, componentId: 23, isError: false, spanType: Local, peer: '', skipAnalysis: 'false'} - - {operationName: GreeterBlocking.sayHello/client/Response/onClose, operationId: 0, - parentSpanId: 2, spanId: 4, spanLayer: RPCFramework, startTime: nq 0, endTime: nq - 0, componentId: 23, isError: false, spanType: Local, peer: '', skipAnalysis: 'false'} - - {operationName: GreeterBlocking.sayHello, operationId: 0, parentSpanId: 0, spanId: 2, - spanLayer: RPCFramework, startTime: nq 0, endTime: nq 0, componentId: 23, isError: false, - spanType: Exit, peer: '127.0.0.1:18080', skipAnalysis: 'false'} - - {operationName: GreeterBlockingError.sayHello/client/Request/onComplete, operationId: 0, - parentSpanId: 5, spanId: 6, spanLayer: RPCFramework, startTime: nq 0, endTime: nq - 0, componentId: 23, isError: false, spanType: Local, peer: '', skipAnalysis: 'false'} - - operationName: GreeterBlockingError.sayHello/client/Response/onClose - operationId: 0 - parentSpanId: 5 - spanId: 7 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: true - spanType: Local - peer: '' - tags: - - {key: status_code, value: UNKNOWN} - logs: - - logEvent: - - {key: event, value: error} - - {key: error.kind, value: io.grpc.StatusRuntimeException} - - {key: message, value: UNKNOWN} - - {key: stack, value: not null} - skipAnalysis: 'false' - - operationName: GreeterBlockingError.sayHello/client/Request/onCancel - operationId: 0 - parentSpanId: 5 - spanId: 8 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: true - spanType: Local - peer: '' - logs: - - logEvent: - - {key: event, value: error} - - {key: error.kind, value: io.grpc.StatusRuntimeException} - - {key: message, value: UNKNOWN} - - {key: stack, value: not null} - skipAnalysis: 'false' - - operationName: GreeterBlockingError.sayHello - operationId: 0 - parentSpanId: 0 - spanId: 5 - spanLayer: RPCFramework - startTime: nq 0 - endTime: nq 0 - componentId: 23 - isError: true - spanType: Exit - peer: 127.0.0.1:18080 - logs: - - logEvent: - - {key: event, value: error} - - {key: error.kind, value: io.grpc.StatusRuntimeException} - - {key: message, value: UNKNOWN} - - {key: stack, value: not null} - skipAnalysis: 'false' - - operationName: /grpc-scenario/case/grpc-scenario - operationId: 0 - parentSpanId: -1 - spanId: 0 - spanLayer: Http - startTime: nq 0 - endTime: nq 0 - componentId: 1 - isError: true - spanType: Entry - peer: '' - tags: - - {key: url, value: 'http://localhost:8080/grpc-scenario/case/grpc-scenario'} - - {key: http.method, value: GET} - - {key: status_code, value: '500'} - logs: - - logEvent: - - {key: event, value: error} - - {key: error.kind, value: org.springframework.web.util.NestedServletException} - - {key: message, value: 'Request processing failed; nested exception is io.grpc.StatusRuntimeException: + - serviceName: grpc-scenario + segmentSize: gt 10 + segments: + - segmentId: not null + spans: + - operationName: GreeterBlocking.sayHello + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Entry + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '127.0.0.1:18080', + refType: CrossProcess, parentSpanId: 2, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/client/Request/onMessage + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, + parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: not null, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/client/Request/onMessage + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, + parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/client/Request/onComplete + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, + parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Entry + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '127.0.0.1:18080', + refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/server/Response/onMessage + operationId: 0 + parentSpanId: 0 + spanId: 1 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + skipAnalysis: 'false' + - operationName: Greeter.sayHello/server/Request/onMessage + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, + parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: not null, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/client/Response/onMessage + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, + parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: not null, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: GreeterBlocking.sayHello/server/Response/onClose + operationId: 0 + parentSpanId: 0 + spanId: 1 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + tags: + - {key: status_code, value: OK} + skipAnalysis: 'false' + - operationName: GreeterBlocking.sayHello/server/Request/onComplete + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: GreeterBlocking.sayHello, networkAddress: '', refType: CrossThread, + parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/server/Response/onMessage + operationId: 0 + parentSpanId: 0 + spanId: 1 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + skipAnalysis: 'false' + - operationName: Greeter.sayHello/server/Request/onMessage + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, + parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/server/Response/onClose + operationId: 0 + parentSpanId: 0 + spanId: 1 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + tags: + - {key: status_code, value: OK} + skipAnalysis: 'false' + - operationName: Greeter.sayHello/server/Request/onComplete + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: Greeter.sayHello, networkAddress: '', refType: CrossThread, + parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/client/Response/onMessage + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, + parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: Greeter.sayHello/client/Response/onClose + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '', refType: CrossThread, + parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: GreeterBlockingError.sayHello + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Entry + peer: '' + refs: + - {parentEndpoint: /grpc-scenario/case/grpc-scenario, networkAddress: '127.0.0.1:18080', + refType: CrossProcess, parentSpanId: 5, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - operationName: GreeterBlockingError.sayHello/server/Response/onClose + operationId: 0 + parentSpanId: 0 + spanId: 1 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: true + spanType: Local + peer: '' + tags: + - {key: status_code, value: UNKNOWN} + logs: + - logEvent: + - {key: event, value: error} + - {key: error.kind, value: java.lang.Exception} + - {key: message, value: ''} + - {key: stack, value: not null} + skipAnalysis: 'false' + - operationName: GreeterBlockingError.sayHello/server/Request/onComplete + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: false + spanType: Local + peer: '' + refs: + - {parentEndpoint: GreeterBlockingError.sayHello, networkAddress: '', refType: CrossThread, + parentSpanId: 0, parentTraceSegmentId: not null, parentServiceInstance: not + null, parentService: grpc-scenario, traceId: not null} + skipAnalysis: 'false' + - segmentId: not null + spans: + - {operationName: Greeter.sayHello, operationId: 0, parentSpanId: 0, spanId: 1, + spanLayer: RPCFramework, startTime: nq 0, endTime: nq 0, componentId: 23, isError: false, + spanType: Exit, peer: '127.0.0.1:18080', skipAnalysis: 'false'} + - {operationName: GreeterBlocking.sayHello/client/Request/onComplete, operationId: 0, + parentSpanId: 2, spanId: 3, spanLayer: RPCFramework, startTime: nq 0, endTime: nq + 0, componentId: 23, isError: false, spanType: Local, peer: '', skipAnalysis: 'false'} + - {operationName: GreeterBlocking.sayHello/client/Response/onClose, operationId: 0, + parentSpanId: 2, spanId: 4, spanLayer: RPCFramework, startTime: nq 0, endTime: nq + 0, componentId: 23, isError: false, spanType: Local, peer: '', skipAnalysis: 'false'} + - {operationName: GreeterBlocking.sayHello, operationId: 0, parentSpanId: 0, spanId: 2, + spanLayer: RPCFramework, startTime: nq 0, endTime: nq 0, componentId: 23, isError: false, + spanType: Exit, peer: '127.0.0.1:18080', skipAnalysis: 'false'} + - {operationName: GreeterBlockingError.sayHello/client/Request/onComplete, operationId: 0, + parentSpanId: 5, spanId: 6, spanLayer: RPCFramework, startTime: nq 0, endTime: nq + 0, componentId: 23, isError: false, spanType: Local, peer: '', skipAnalysis: 'false'} + - operationName: GreeterBlockingError.sayHello/client/Response/onClose + operationId: 0 + parentSpanId: 5 + spanId: 7 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: true + spanType: Local + peer: '' + tags: + - {key: status_code, value: UNKNOWN} + logs: + - logEvent: + - {key: event, value: error} + - {key: error.kind, value: io.grpc.StatusRuntimeException} + - {key: message, value: UNKNOWN} + - {key: stack, value: not null} + skipAnalysis: 'false' + - operationName: GreeterBlockingError.sayHello/client/Request/onCancel + operationId: 0 + parentSpanId: 5 + spanId: 8 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: true + spanType: Local + peer: '' + logs: + - logEvent: + - {key: event, value: error} + - {key: error.kind, value: io.grpc.StatusRuntimeException} + - {key: message, value: UNKNOWN} + - {key: stack, value: not null} + skipAnalysis: 'false' + - operationName: GreeterBlockingError.sayHello + operationId: 0 + parentSpanId: 0 + spanId: 5 + spanLayer: RPCFramework + startTime: nq 0 + endTime: nq 0 + componentId: 23 + isError: true + spanType: Exit + peer: 127.0.0.1:18080 + logs: + - logEvent: + - {key: event, value: error} + - {key: error.kind, value: io.grpc.StatusRuntimeException} + - {key: message, value: UNKNOWN} + - {key: stack, value: not null} + skipAnalysis: 'false' + - operationName: /grpc-scenario/case/grpc-scenario + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: Http + startTime: nq 0 + endTime: nq 0 + componentId: 1 + isError: true + spanType: Entry + peer: '' + tags: + - {key: url, value: 'http://localhost:8080/grpc-scenario/case/grpc-scenario'} + - {key: http.method, value: GET} + - {key: status_code, value: '500'} + logs: + - logEvent: + - {key: event, value: error} + - {key: error.kind, value: org.springframework.web.util.NestedServletException} + - {key: message, value: 'Request processing failed; nested exception is io.grpc.StatusRuntimeException: UNKNOWN'} - - {key: stack, value: not null} - - logEvent: - - {key: forward-url, value: /grpc-scenario/error} - skipAnalysis: 'false' + - {key: stack, value: not null} + - logEvent: + - {key: forward-url, value: /grpc-scenario/error} + skipAnalysis: 'false'