From 2f1756489e4fcd3de2a2ac696ad79afd96e761de Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 7 Aug 2018 02:51:30 -0700 Subject: [PATCH] Add tracing capabilities for internode rpc Servers (#6254) --- cmd/admin-rpc-server.go | 2 +- cmd/lock-rpc-server.go | 2 +- cmd/peer-rpc-server.go | 2 +- cmd/storage-rpc-server.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/admin-rpc-server.go b/cmd/admin-rpc-server.go index 7ce583d3c..be4dab8f5 100644 --- a/cmd/admin-rpc-server.go +++ b/cmd/admin-rpc-server.go @@ -108,5 +108,5 @@ func registerAdminRPCRouter(router *mux.Router) { rpcServer, err := NewAdminRPCServer() logger.FatalIf(err, "Unable to initialize Lock RPC Server", context.Background()) subrouter := router.PathPrefix(minioReservedBucketPath).Subrouter() - subrouter.Path(adminServiceSubPath).Handler(rpcServer) + subrouter.Path(adminServiceSubPath).HandlerFunc(httpTraceHdrs(rpcServer.ServeHTTP)) } diff --git a/cmd/lock-rpc-server.go b/cmd/lock-rpc-server.go index 480639ff7..29d7b0de4 100644 --- a/cmd/lock-rpc-server.go +++ b/cmd/lock-rpc-server.go @@ -192,5 +192,5 @@ func registerDistNSLockRouter(router *mux.Router) { go startLockMaintenance(globalLockServer) subrouter := router.PathPrefix(minioReservedBucketPath).Subrouter() - subrouter.Path(lockServiceSubPath).Handler(rpcServer) + subrouter.Path(lockServiceSubPath).HandlerFunc(httpTraceHdrs(rpcServer.ServeHTTP)) } diff --git a/cmd/peer-rpc-server.go b/cmd/peer-rpc-server.go index 2ebc6059c..b1d3ec884 100644 --- a/cmd/peer-rpc-server.go +++ b/cmd/peer-rpc-server.go @@ -203,5 +203,5 @@ func registerPeerRPCRouter(router *mux.Router) { rpcServer, err := NewPeerRPCServer() logger.FatalIf(err, "Unable to initialize peer RPC Server", context.Background()) subrouter := router.PathPrefix(minioReservedBucketPath).Subrouter() - subrouter.Path(peerServiceSubPath).Handler(rpcServer) + subrouter.Path(peerServiceSubPath).HandlerFunc(httpTraceHdrs(rpcServer.ServeHTTP)) } diff --git a/cmd/storage-rpc-server.go b/cmd/storage-rpc-server.go index 8e9e0c8ee..bc7b71d50 100644 --- a/cmd/storage-rpc-server.go +++ b/cmd/storage-rpc-server.go @@ -226,7 +226,7 @@ func registerStorageRPCRouters(router *mux.Router, endpoints EndpointList) { logger.Fatal(uiErrUnableToWriteInBackend(err), "Unable to configure one of server's RPC services") } subrouter := router.PathPrefix(minioReservedBucketPath).Subrouter() - subrouter.Path(path.Join(storageServiceSubPath, endpoint.Path)).Handler(rpcServer) + subrouter.Path(path.Join(storageServiceSubPath, endpoint.Path)).HandlerFunc(httpTraceHdrs(rpcServer.ServeHTTP)) } } }