Skip to content

Commit e84e2ce

Browse files
authored
feat(trace): Disabled otlp-grpc block mode (#321)
1 parent c564333 commit e84e2ce

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

trace/otlp.go

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ func NewOtlpGrpcClientConnection(ctx context.Context, host string, dialOptions .
1818

1919
dialContextOptions := []grpc.DialOption{
2020
grpc.WithTransportCredentials(insecure.NewCredentials()),
21-
grpc.WithBlock(),
2221
}
2322

2423
dialContextOptions = append(dialContextOptions, dialOptions...)

trace/otlp_test.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func TestNewOtlpGrpcInsecureConnectionSuccess(t *testing.T) {
3434
context.Background(),
3535
"bufnet",
3636
grpc.WithContextDialer(bufDialer),
37+
grpc.WithBlock(),
3738
)
3839
assert.NoError(t, err)
3940

@@ -51,7 +52,11 @@ func TestNewOtlpGrpcInsecureConnectionError(t *testing.T) {
5152
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(1*time.Microsecond))
5253
defer cancel()
5354

54-
_, err := trace.NewOtlpGrpcClientConnection(ctx, "https://example.com")
55+
_, err := trace.NewOtlpGrpcClientConnection(
56+
ctx,
57+
"https://example.com",
58+
grpc.WithBlock(),
59+
)
5560
assert.Error(t, err)
5661
assert.Contains(t, err.Error(), "context deadline exceeded")
5762
}

0 commit comments

Comments
 (0)