Skip to content

Commit

Permalink
use grpc.WithStatsHandler(otelgrpc.NewClientHandler ...
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Feb 8, 2024
1 parent 604b101 commit 515dad9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pkg/rgrpc/todo/pool/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,14 @@ func NewConn(address string, opts ...Option) (*grpc.ClientConn, error) {
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(maxRcvMsgSize),
),
grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor(
grpc.WithStatsHandler(otelgrpc.NewClientHandler(
otelgrpc.WithTracerProvider(
options.tracerProvider,
),
otelgrpc.WithPropagators(
rtrace.Propagator,
),
)),
grpc.WithUnaryInterceptor(
otelgrpc.UnaryClientInterceptor(
otelgrpc.WithTracerProvider(
options.tracerProvider,
),
otelgrpc.WithPropagators(
rtrace.Propagator,
),
),
),
)
if err != nil {
return nil, err
Expand Down

0 comments on commit 515dad9

Please sign in to comment.