mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-27 04:36:37 +00:00
client: add gRPC logging interceptor for request and response tracking
This commit is contained in:
@@ -38,6 +38,8 @@ import (
|
||||
"github.com/netbirdio/netbird/client/ui/process"
|
||||
"github.com/netbirdio/netbird/util"
|
||||
|
||||
grpcLogger "github.com/netbirdio/netbird/client/grpc/logger"
|
||||
|
||||
"github.com/netbirdio/netbird/version"
|
||||
)
|
||||
|
||||
@@ -822,6 +824,7 @@ func (s *serviceClient) getSrvClient(timeout time.Duration) (proto.DaemonService
|
||||
strings.TrimPrefix(s.addr, "tcp://"),
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
grpc.WithBlock(),
|
||||
grpc.WithUnaryInterceptor(grpcLogger.UnaryClientInterceptor()),
|
||||
grpc.WithUserAgent(desktop.GetUIUserAgent()),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user