fix validate

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
This commit is contained in:
David van der Spek 2023-08-17 18:20:47 +02:00
parent e248ccd526
commit 52872b2e1c
Failed to extract signature
2 changed files with 2 additions and 3 deletions

2
go.mod
View file

@ -34,7 +34,7 @@ require (
golang.org/x/crypto v0.12.0
golang.org/x/oauth2 v0.8.0
google.golang.org/api v0.125.0
google.golang.org/grpc v1.57.0
google.golang.org/grpc v1.57.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/yaml.v2 v2.4.0
)

View file

@ -15,7 +15,6 @@ import (
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.opentelemetry.io/otel/trace"
"google.golang.org/grpc"
)
// InitOpenTelemetry reads config and initializes otel middleware, sets the exporter
@ -47,7 +46,7 @@ func InitOpenTelemetry(ctx context.Context, config *configuration.OpenTelemetryC
ctrdTraceExporter, err := otlptracegrpc.New(ctx,
otlptracegrpc.WithInsecure(),
otlptracegrpc.WithEndpoint(config.Exporter.Endpoint),
otlptracegrpc.WithDialOption(grpc.WithBlock(), grpc.WithTimeout(time.Second*10)),
otlptracegrpc.WithTimeout(time.Second*10),
)
if err != nil {
return nil, fmt.Errorf("failed to create trace exporter: %w", err)