diff --git a/src/core/grpc.go b/src/core/grpc.go index 0d22474f7..33d77457a 100644 --- a/src/core/grpc.go +++ b/src/core/grpc.go @@ -68,7 +68,7 @@ func CreateGrpcClients(ctx context.Context, loadedConfig *config.Config) (client } func setDialOptions(loadedConfig *config.Config) []grpc.DialOption { - grpcDialOptions := []grpc.DialOption{grpc.WithUserAgent("nginx-agent/" + strings.TrimPrefix(version, "v"))} + grpcDialOptions := []grpc.DialOption{grpc.WithUserAgent("nginx-agent/" + strings.TrimPrefix(loadedConfig.Version, "v"))} grpcDialOptions = append(grpcDialOptions, sdkGRPC.DefaultClientDialOptions...) grpcDialOptions = append(grpcDialOptions, sdkGRPC.DataplaneConnectionDialOptions(loadedConfig.Server.Token, sdkGRPC.NewMessageMeta(uuid.NewString()))...) return grpcDialOptions diff --git a/test/integration/vendor/github.com/nginx/agent/v2/src/core/grpc.go b/test/integration/vendor/github.com/nginx/agent/v2/src/core/grpc.go index 0d22474f7..33d77457a 100644 --- a/test/integration/vendor/github.com/nginx/agent/v2/src/core/grpc.go +++ b/test/integration/vendor/github.com/nginx/agent/v2/src/core/grpc.go @@ -68,7 +68,7 @@ func CreateGrpcClients(ctx context.Context, loadedConfig *config.Config) (client } func setDialOptions(loadedConfig *config.Config) []grpc.DialOption { - grpcDialOptions := []grpc.DialOption{grpc.WithUserAgent("nginx-agent/" + strings.TrimPrefix(version, "v"))} + grpcDialOptions := []grpc.DialOption{grpc.WithUserAgent("nginx-agent/" + strings.TrimPrefix(loadedConfig.Version, "v"))} grpcDialOptions = append(grpcDialOptions, sdkGRPC.DefaultClientDialOptions...) grpcDialOptions = append(grpcDialOptions, sdkGRPC.DataplaneConnectionDialOptions(loadedConfig.Server.Token, sdkGRPC.NewMessageMeta(uuid.NewString()))...) return grpcDialOptions diff --git a/test/performance/vendor/github.com/nginx/agent/v2/src/core/grpc.go b/test/performance/vendor/github.com/nginx/agent/v2/src/core/grpc.go index 0d22474f7..33d77457a 100644 --- a/test/performance/vendor/github.com/nginx/agent/v2/src/core/grpc.go +++ b/test/performance/vendor/github.com/nginx/agent/v2/src/core/grpc.go @@ -68,7 +68,7 @@ func CreateGrpcClients(ctx context.Context, loadedConfig *config.Config) (client } func setDialOptions(loadedConfig *config.Config) []grpc.DialOption { - grpcDialOptions := []grpc.DialOption{grpc.WithUserAgent("nginx-agent/" + strings.TrimPrefix(version, "v"))} + grpcDialOptions := []grpc.DialOption{grpc.WithUserAgent("nginx-agent/" + strings.TrimPrefix(loadedConfig.Version, "v"))} grpcDialOptions = append(grpcDialOptions, sdkGRPC.DefaultClientDialOptions...) grpcDialOptions = append(grpcDialOptions, sdkGRPC.DataplaneConnectionDialOptions(loadedConfig.Server.Token, sdkGRPC.NewMessageMeta(uuid.NewString()))...) return grpcDialOptions