Skip to content

Commit 3aaa967

Browse files
committed
Remove deprecated otelgrpc.UnaryClientInterceptor call
The call is not available in newer OpenTelemetry update.
1 parent 8c688d0 commit 3aaa967

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

connection/connection.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ func connect(
183183
if o.metricsManager != nil {
184184
interceptors = append(interceptors, ExtendedCSIMetricsManager{o.metricsManager}.RecordMetricsClientInterceptor)
185185
}
186+
dialOptions = append(dialOptions, grpc.WithChainUnaryInterceptor(interceptors...))
186187
if o.enableOtelTracing {
187-
interceptors = append(interceptors, otelgrpc.UnaryClientInterceptor())
188+
dialOptions = append(dialOptions, grpc.WithStatsHandler(otelgrpc.NewClientHandler()))
188189
}
189-
dialOptions = append(dialOptions, grpc.WithChainUnaryInterceptor(interceptors...))
190190

191191
unixPrefix := "unix://"
192192
if strings.HasPrefix(address, "/") {

0 commit comments

Comments
 (0)