From 160f4dd2ae510469a22c8ea26a96cc689d69d80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 23 Oct 2023 21:24:28 +0200 Subject: [PATCH] Rename tracesdk to sdktrace --- server/server.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/server.go b/server/server.go index dce64cd..a8c7b31 100644 --- a/server/server.go +++ b/server/server.go @@ -21,7 +21,7 @@ import ( "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/sdk/resource" - tracesdk "go.opentelemetry.io/otel/sdk/trace" + sdktrace "go.opentelemetry.io/otel/sdk/trace" semconv "go.opentelemetry.io/otel/semconv/v1.21.0" "go.opentelemetry.io/otel/trace" ) @@ -71,7 +71,7 @@ func NewServer(config *Config) (*Server, error) { return srv, nil } -func tracerProvider(url string) (*tracesdk.TracerProvider, error) { +func tracerProvider(url string) (*sdktrace.TracerProvider, error) { exp, err := otlptracehttp.New(context.Background(), otlptracehttp.WithEndpoint(url), otlptracehttp.WithInsecure()) if err != nil { return nil, err @@ -81,9 +81,9 @@ func tracerProvider(url string) (*tracesdk.TracerProvider, error) { semconv.ServiceName("mf-proxy"), semconv.ServiceVersion(proxy.Version), ) - tp := tracesdk.NewTracerProvider( - tracesdk.WithBatcher(exp, tracesdk.WithBatchTimeout(time.Second)), - tracesdk.WithResource(res), + tp := sdktrace.NewTracerProvider( + sdktrace.WithBatcher(exp, sdktrace.WithBatchTimeout(time.Second)), + sdktrace.WithResource(res), ) otel.SetTracerProvider(tp) otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))