From 78ce5c3f69835341a90084a1ff6d6a10e25b14d3 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 15 Sep 2022 16:39:49 +0800 Subject: [PATCH] prometheus --- internal/msg_gateway/gate/relay_rpc_server.go | 2 +- internal/push/logic/push_rpc_server.go | 2 +- internal/rpc/admin_cms/admin_cms.go | 2 +- internal/rpc/auth/auth.go | 2 +- internal/rpc/cache/cache.go | 2 +- internal/rpc/conversation/conversaion.go | 2 +- internal/rpc/friend/friend.go | 2 +- internal/rpc/group/group.go | 2 +- internal/rpc/msg/rpcChat.go | 2 +- internal/rpc/office/office.go | 2 +- internal/rpc/organization/organization.go | 2 +- internal/rpc/user/user.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/msg_gateway/gate/relay_rpc_server.go b/internal/msg_gateway/gate/relay_rpc_server.go index 0dc41864f..830a6cb80 100644 --- a/internal/msg_gateway/gate/relay_rpc_server.go +++ b/internal/msg_gateway/gate/relay_rpc_server.go @@ -71,7 +71,7 @@ func (r *RPCServer) run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/push/logic/push_rpc_server.go b/internal/push/logic/push_rpc_server.go index 99962559d..e48906c00 100644 --- a/internal/push/logic/push_rpc_server.go +++ b/internal/push/logic/push_rpc_server.go @@ -51,7 +51,7 @@ func (r *RPCServer) run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/admin_cms/admin_cms.go b/internal/rpc/admin_cms/admin_cms.go index aa82c0e74..6a9d2b25b 100644 --- a/internal/rpc/admin_cms/admin_cms.go +++ b/internal/rpc/admin_cms/admin_cms.go @@ -67,7 +67,7 @@ func (s *adminCMSServer) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index 16ac9c117..8a720e3e5 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -131,7 +131,7 @@ func (rpc *rpcAuth) Run() { promePkg.NewUserRegisterCounter() promePkg.NewUserLoginCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/cache/cache.go b/internal/rpc/cache/cache.go index 9f0ae8022..6e1eed5aa 100644 --- a/internal/rpc/cache/cache.go +++ b/internal/rpc/cache/cache.go @@ -58,7 +58,7 @@ func (s *cacheServer) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index b9fbc9452..be51e770f 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -193,7 +193,7 @@ func (rpc *rpcConversation) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index 379f29eda..abdcaa6c1 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -69,7 +69,7 @@ func (s *friendServer) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 70006b5a2..740919ee2 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -78,7 +78,7 @@ func (s *groupServer) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/msg/rpcChat.go b/internal/rpc/msg/rpcChat.go index e5cd0ed97..c20a613db 100644 --- a/internal/rpc/msg/rpcChat.go +++ b/internal/rpc/msg/rpcChat.go @@ -102,7 +102,7 @@ func (rpc *rpcChat) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/office/office.go b/internal/rpc/office/office.go index f0692f3cc..18b8e70f5 100644 --- a/internal/rpc/office/office.go +++ b/internal/rpc/office/office.go @@ -75,7 +75,7 @@ func (s *officeServer) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/organization/organization.go b/internal/rpc/organization/organization.go index ea78ad85b..50d4c2ab5 100644 --- a/internal/rpc/organization/organization.go +++ b/internal/rpc/organization/organization.go @@ -67,7 +67,7 @@ func (s *organizationServer) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 0ae46e5e4..80bf1ca89 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -70,7 +70,7 @@ func (s *userServer) Run() { promePkg.NewGrpcRequestFailedCounter() promePkg.NewGrpcRequestSuccessCounter() grpcOpts = append(grpcOpts, []grpc.ServerOption{ - grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...)