|
|
@ -26,9 +26,11 @@ func UnaryTracingInterceptor(ctx context.Context, method string, req, reply inte
|
|
|
|
defer span.End()
|
|
|
|
defer span.End()
|
|
|
|
|
|
|
|
|
|
|
|
ztrace.MessageSent.Event(ctx, 1, req)
|
|
|
|
ztrace.MessageSent.Event(ctx, 1, req)
|
|
|
|
ztrace.MessageReceived.Event(ctx, 1, reply)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if err := invoker(ctx, method, req, reply, cc, opts...); err != nil {
|
|
|
|
err := invoker(ctx, method, req, reply, cc, opts...)
|
|
|
|
|
|
|
|
// fix: https://github.com/zeromicro/go-zero/issues/1954
|
|
|
|
|
|
|
|
ztrace.MessageReceived.Event(ctx, 1, reply)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
s, ok := status.FromError(err)
|
|
|
|
s, ok := status.FromError(err)
|
|
|
|
if ok {
|
|
|
|
if ok {
|
|
|
|
span.SetStatus(codes.Error, s.Message())
|
|
|
|
span.SetStatus(codes.Error, s.Message())
|
|
|
|