Merge pull request #283 from Sajmani/master
grpc: rename request trace family from "Sent" and "Recv" to "grpc.Sent" and "grpc.Recv"
This commit is contained in:
2
call.go
2
call.go
@ -118,7 +118,7 @@ func Invoke(ctx context.Context, method string, args, reply interface{}, cc *Cli
|
||||
}()
|
||||
|
||||
if EnableTracing {
|
||||
c.traceInfo.tr = trace.New("Sent."+methodFamily(method), method)
|
||||
c.traceInfo.tr = trace.New("grpc.Sent."+methodFamily(method), method)
|
||||
defer c.traceInfo.tr.Finish()
|
||||
c.traceInfo.firstLine.client = true
|
||||
if deadline, ok := ctx.Deadline(); ok {
|
||||
|
@ -251,7 +251,7 @@ func (s *Server) sendResponse(t transport.ServerTransport, stream *transport.Str
|
||||
func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, md *MethodDesc) (err error) {
|
||||
var traceInfo traceInfo
|
||||
if EnableTracing {
|
||||
traceInfo.tr = trace.New("Recv."+methodFamily(stream.Method()), stream.Method())
|
||||
traceInfo.tr = trace.New("grpc.Recv."+methodFamily(stream.Method()), stream.Method())
|
||||
defer traceInfo.tr.Finish()
|
||||
traceInfo.firstLine.client = false
|
||||
traceInfo.tr.LazyLog(&traceInfo.firstLine, false)
|
||||
@ -340,7 +340,7 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
|
||||
tracing: EnableTracing,
|
||||
}
|
||||
if ss.tracing {
|
||||
ss.traceInfo.tr = trace.New("Recv."+methodFamily(stream.Method()), stream.Method())
|
||||
ss.traceInfo.tr = trace.New("grpc.Recv."+methodFamily(stream.Method()), stream.Method())
|
||||
ss.traceInfo.firstLine.client = false
|
||||
ss.traceInfo.tr.LazyLog(&ss.traceInfo.firstLine, false)
|
||||
defer func() {
|
||||
|
@ -107,7 +107,7 @@ func NewClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
|
||||
tracing: EnableTracing,
|
||||
}
|
||||
if cs.tracing {
|
||||
cs.traceInfo.tr = trace.New("Sent."+methodFamily(method), method)
|
||||
cs.traceInfo.tr = trace.New("grpc.Sent."+methodFamily(method), method)
|
||||
cs.traceInfo.firstLine.client = true
|
||||
if deadline, ok := ctx.Deadline(); ok {
|
||||
cs.traceInfo.firstLine.deadline = deadline.Sub(time.Now())
|
||||
|
Reference in New Issue
Block a user