Skip to content

Commit 4a2648e

Browse files
easyCZroboquat
authored andcommitted
Revert "[usage] Use DefaultClientOptions when creating grpc client connection"
This reverts commit 0f5d689.
1 parent 960f82a commit 4a2648e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

components/usage/pkg/server/server.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package server
66

77
import (
88
"fmt"
9-
gitpod_grpc "github.com/gitpod-io/gitpod/common-go/grpc"
109
"net"
1110
"os"
1211
"time"
@@ -71,11 +70,15 @@ func Start(cfg Config, version string) error {
7170
if err != nil {
7271
return fmt.Errorf("failed to register grpc client metrics: %w", err)
7372
}
74-
selfConnection, err := grpc.Dial(srv.GRPCAddress(), append(
75-
gitpod_grpc.DefaultClientOptions(),
73+
selfConnection, err := grpc.Dial(srv.GRPCAddress(),
7674
grpc.WithTransportCredentials(insecure.NewCredentials()),
77-
grpcDialerWithInitialDelay(1*time.Second))...,
78-
)
75+
grpcDialerWithInitialDelay(1*time.Second),
76+
grpc.WithUnaryInterceptor(grpcClientMetrics.UnaryClientInterceptor()),
77+
grpc.WithStreamInterceptor(grpcClientMetrics.StreamClientInterceptor()),
78+
grpc.WithDefaultCallOptions(
79+
grpc.MaxCallRecvMsgSize(100*1024*1024),
80+
grpc.MaxCallSendMsgSize(100*1024*1024),
81+
))
7982
if err != nil {
8083
return fmt.Errorf("failed to create self-connection to grpc server: %w", err)
8184
}

0 commit comments

Comments
 (0)