Browse Source

更新追踪埋点

lijian 6 years ago
parent
commit
b8c73a5dd1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      pkg/server/server.go

+ 3 - 0
pkg/server/server.go

@@ -198,6 +198,9 @@ func RPCCallByName(ctx context.Context, serverName string, serverMethod string,
 	if ctx != nil {
 		sp := opentracing.SpanFromContext(ctx)
 		span = opentracing.StartSpan(serverName, opentracing.ChildOf(sp.Context()))
+
+	} else {
+		span = opentracing.StartSpan(serverName)
 	}
 	span.LogFields(
 		log.Object("args", args),