From b528f506868f109cc158d8ae79bbba631fd776d9 Mon Sep 17 00:00:00 2001 From: Yasser Elsayed Date: Tue, 27 Nov 2018 11:39:52 -0800 Subject: [PATCH] add finish timestamp to API interceptor (#386) --- backend/src/apiserver/interceptor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/apiserver/interceptor.go b/backend/src/apiserver/interceptor.go index 24ed32ab914..a26df338e17 100644 --- a/backend/src/apiserver/interceptor.go +++ b/backend/src/apiserver/interceptor.go @@ -26,7 +26,7 @@ import ( // to be executed before and after all API handler calls, e.g. Logging, error handling. // For more details, see https://github.com/grpc/grpc-go/blob/master/interceptor.go func apiServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { - glog.Infof("%v called", info.FullMethod) + glog.Infof("%v handler starting", info.FullMethod) resp, err = handler(ctx, req) if err != nil { util.LogError(util.Wrapf(err, "%s call failed", info.FullMethod)) @@ -34,5 +34,6 @@ func apiServerInterceptor(ctx context.Context, req interface{}, info *grpc.Unary err = util.ToGRPCError(err) return } + glog.Infof("%v handler finished", info.FullMethod) return }