From aa6b439e8c11dbff705b09adce1a30184e958b7d Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 15 Sep 2022 01:35:08 +0800 Subject: [PATCH] prome --- internal/msg_gateway/gate/relay_rpc_server.go | 2 +- internal/push/logic/push_rpc_server.go | 2 +- internal/rpc/auth/auth.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/user/user.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/msg_gateway/gate/relay_rpc_server.go b/internal/msg_gateway/gate/relay_rpc_server.go index e201061e3..34aac553a 100644 --- a/internal/msg_gateway/gate/relay_rpc_server.go +++ b/internal/msg_gateway/gate/relay_rpc_server.go @@ -56,7 +56,7 @@ func (r *RPCServer) run() { defer listener.Close() var grpcOpts []grpc.ServerOption if config.Config.Prometheus.Enable { - grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme) + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme)) } srv := grpc.NewServer(grpcOpts...) defer srv.GracefulStop() diff --git a/internal/push/logic/push_rpc_server.go b/internal/push/logic/push_rpc_server.go index a95afd24e..8f0344a3e 100644 --- a/internal/push/logic/push_rpc_server.go +++ b/internal/push/logic/push_rpc_server.go @@ -45,7 +45,7 @@ func (r *RPCServer) run() { defer listener.Close() var grpcOpts []grpc.ServerOption if config.Config.Prometheus.Enable { - grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme) + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme)) } srv := grpc.NewServer(grpcOpts...) defer srv.GracefulStop() diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index 46ec43f2b..cbd88d8b0 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -128,7 +128,7 @@ func (rpc *rpcAuth) Run() { log.NewInfo(operationID, "listen network success, ", address, listener) var grpcOpts []grpc.ServerOption if config.Config.Prometheus.Enable { - grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme) + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme)) } srv := grpc.NewServer(grpcOpts...) defer srv.GracefulStop() diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index 19cd5ead7..b57c7c163 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -187,7 +187,7 @@ func (rpc *rpcConversation) Run() { //grpc server var grpcOpts []grpc.ServerOption if config.Config.Prometheus.Enable { - grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme) + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme)) } srv := grpc.NewServer(grpcOpts...) defer srv.GracefulStop() diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index 6f174c697..0d2a8e209 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -63,7 +63,7 @@ func (s *friendServer) Run() { //grpc server var grpcOpts []grpc.ServerOption if config.Config.Prometheus.Enable { - grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme) + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme)) } srv := grpc.NewServer(grpcOpts...) defer srv.GracefulStop() diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 062765069..380d6c021 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -72,7 +72,7 @@ func (s *groupServer) Run() { } var grpcOpts []grpc.ServerOption if config.Config.Prometheus.Enable { - grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme) + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme)) } srv := grpc.NewServer(options...) defer srv.GracefulStop() diff --git a/internal/rpc/msg/rpcChat.go b/internal/rpc/msg/rpcChat.go index bbd249622..f6280df37 100644 --- a/internal/rpc/msg/rpcChat.go +++ b/internal/rpc/msg/rpcChat.go @@ -69,7 +69,7 @@ func (rpc *rpcChat) Run() { var grpcOpts []grpc.ServerOption if config.Config.Prometheus.Enable { - grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme) + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme)) } srv := grpc.NewServer(grpcOpts...) defer srv.GracefulStop() diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 241e6d081..7d980d4be 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -64,7 +64,7 @@ func (s *userServer) Run() { //grpc server var grpcOpts []grpc.ServerOption if config.Config.Prometheus.Enable { - grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme) + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme)) } srv := grpc.NewServer(grpcOpts...) defer srv.GracefulStop()