mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-21 09:46:40 +00:00
client: add gRPC logging interceptor for request and response tracking
This commit is contained in:
@@ -21,6 +21,8 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
|
||||
grpcLogger "github.com/netbirdio/netbird/client/grpc/logger"
|
||||
|
||||
"github.com/netbirdio/netbird/client/internal"
|
||||
)
|
||||
|
||||
@@ -241,6 +243,7 @@ func DialClientGRPCServer(ctx context.Context, addr string) (*grpc.ClientConn, e
|
||||
strings.TrimPrefix(addr, "tcp://"),
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
grpc.WithBlock(),
|
||||
grpc.WithUnaryInterceptor(grpcLogger.UnaryClientInterceptor()),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user