Chore: Upgrade grpc-ecosystem/go-grpc-middleware to v2 (#86724)

* Chore: Replace deprecated prometheus grpc middleware

* go mod tidy without enterprise

* with updated sdk branch

* sdk v0.226.0

* remove deprecated opentracing support for outgoing plugin requests

* migrate to github.com/grpc-ecosystem/go-grpc-middleware/v2

* fix
This commit is contained in:
Marcus Efraimsson
2024-04-25 17:25:48 +02:00
committed by GitHub
parent 42778de2b4
commit ac152ca416
14 changed files with 84 additions and 207 deletions

View File

@ -4,7 +4,6 @@ import (
"os/exec"
"github.com/grafana/grafana-plugin-sdk-go/backend/grpcplugin"
grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
goplugin "github.com/hashicorp/go-plugin"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
"google.golang.org/grpc"
@ -54,12 +53,6 @@ func newClientConfig(executablePath string, args []string, env []string, skipHos
Logger: logWrapper{Logger: logger},
AllowedProtocols: []goplugin.Protocol{goplugin.ProtocolGRPC},
GRPCDialOptions: []grpc.DialOption{
grpc.WithChainUnaryInterceptor(
grpc_opentracing.UnaryClientInterceptor(),
),
grpc.WithChainStreamInterceptor(
grpc_opentracing.StreamClientInterceptor(),
),
grpc.WithStatsHandler(otelgrpc.NewClientHandler()),
},
}