fix the response time of gRPC is not right. (#7179)

This commit is contained in:
844067874 2021-06-28 18:55:27 +08:00 committed by GitHub
parent e7bc81abbb
commit e1aad420db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 459 additions and 492 deletions

View File

@ -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.

View File

@ -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);
}
}

View File

@ -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<REQUEST, RESPONSE> extends ForwardingServerCall.SimpleForwardingServerCall<REQUEST, RESPONSE> {
private final String operationPrefix;
private final ContextSnapshot contextSnapshot;
protected TracingServerCall(ServerCall<REQUEST, RESPONSE> delegate, ContextSnapshot contextSnapshot) {
protected TracingServerCall(ServerCall<REQUEST, RESPONSE> delegate) {
super(delegate);
this.operationPrefix = OperationNameFormatUtil.formatOperationName(delegate.getMethodDescriptor()) + SERVER;
this.contextSnapshot = contextSnapshot;
}
@Override
@ -52,7 +48,6 @@ public class TracingServerCall<REQUEST, RESPONSE> 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<REQUEST, RESPONSE> 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<REQUEST, RESPONSE> extends ForwardingServerCall.S
ContextManager.stopSpan();
}
}
}

View File

@ -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<REQUEST> extends ForwardingServerCallListener.SimpleForwardingServerCallListener<REQUEST> {
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<REQUEST> delegate, MethodDescriptor<REQUEST, ?> descriptor,
ContextSnapshot contextSnapshot) {
private AbstractSpan asyncSpan;
private ContextSnapshot contextSnapshot;
protected TracingServerCallListener(ServerCall.Listener<REQUEST> delegate, MethodDescriptor<REQUEST, ?> 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<REQUEST> 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<REQUEST> 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<REQUEST> 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();
}
}

View File

@ -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

View File

@ -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'