Skip to content

Commit 4101242

Browse files
committed
replaced with otel v0.46.1
1 parent 476e215 commit 4101242

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

client/gitSensor/GitSensorGrpcClient.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"fmt"
2222
pb "github.com/devtron-labs/protos/gitSensor"
2323
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
24+
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
2425
"go.uber.org/zap"
2526
"google.golang.org/grpc"
2627
"google.golang.org/grpc/credentials/insecure"
@@ -86,7 +87,7 @@ func (client *GrpcApiClientImpl) getConnection() (*grpc.ClientConn, error) {
8687
// Configure gRPC dial options
8788
var opts []grpc.DialOption
8889
opts = append(opts,
89-
grpc.WithChainUnaryInterceptor(grpc_prometheus.UnaryClientInterceptor),
90+
grpc.WithChainUnaryInterceptor(grpc_prometheus.UnaryClientInterceptor, otelgrpc.UnaryClientInterceptor()),
9091
grpc.WithBlock(),
9192
grpc.WithTransportCredentials(insecure.NewCredentials()),
9293
grpc.WithDefaultServiceConfig(client.config.ServiceConfig),

0 commit comments

Comments
 (0)