From ccefc3c984cbf20606960fb23aeae5c9cc3c4cef Mon Sep 17 00:00:00 2001 From: Lifosmin Simon Date: Mon, 28 Oct 2024 11:33:31 +0700 Subject: [PATCH] fix go mod --- go.mod | 2 +- pkg/opentelemetry/init.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 43f2de67..0cf5e302 100644 --- a/go.mod +++ b/go.mod @@ -42,6 +42,7 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 + go.opentelemetry.io/otel/metric v1.29.0 go.opentelemetry.io/otel/sdk v1.29.0 go.opentelemetry.io/otel/sdk/metric v1.27.0 golang.org/x/net v0.22.0 @@ -170,7 +171,6 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.29.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/atomic v1.10.0 // indirect diff --git a/pkg/opentelemetry/init.go b/pkg/opentelemetry/init.go index 3e5fd702..2b62fe13 100644 --- a/pkg/opentelemetry/init.go +++ b/pkg/opentelemetry/init.go @@ -12,7 +12,6 @@ import ( "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc" "go.opentelemetry.io/otel/exporters/otlp/otlptrace" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" - "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" "go.opentelemetry.io/otel/propagation" sdkMetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" @@ -107,7 +106,6 @@ func initGlobalTracer(ctx context.Context, res *resource.Resource, cfg Config) ( return nil, fmt.Errorf("create trace exporter: %w", err) } - stdoutExporter, err := stdouttrace.New(stdouttrace.WithPrettyPrint()) if err != nil { return nil, fmt.Errorf("create stdout trace exporter: %w", err) } @@ -116,7 +114,6 @@ func initGlobalTracer(ctx context.Context, res *resource.Resource, cfg Config) ( sdktrace.WithSampler(sdktrace.AlwaysSample()), sdktrace.WithResource(res), sdktrace.WithBatcher(exporter), - sdktrace.WithBatcher(stdoutExporter), // Stdout exporter ) otel.SetTracerProvider(tracerProvider)