From 816bb505c33fdff89064d71e9aa914c0f935ecfb Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Thu, 7 Nov 2024 09:15:41 -0800 Subject: [PATCH] Update use of auto/sdk --- internal/global/trace.go | 2 +- internal/global/trace_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/global/trace.go b/internal/global/trace.go index 420d0b8e880..8982aa0dc56 100644 --- a/internal/global/trace.go +++ b/internal/global/trace.go @@ -166,7 +166,7 @@ func (t *tracer) newSpan(ctx context.Context, autoSpan *bool, name string, opts // should not be read from the global. if *autoSpan { - tracer := sdk.GetTracerProvider().Tracer(t.name, t.opts...) + tracer := sdk.TracerProvider().Tracer(t.name, t.opts...) return tracer.Start(ctx, name, opts...) } diff --git a/internal/global/trace_test.go b/internal/global/trace_test.go index 698915e503a..01eb0314a4c 100644 --- a/internal/global/trace_test.go +++ b/internal/global/trace_test.go @@ -287,7 +287,7 @@ func TestNewSpanType(t *testing.T) { t.Cleanup(func() { *autoInstEnabled = orig }) _, got = tracer.newSpan(ctx, autoInstEnabled, "", nil) - autoTracer := sdk.GetTracerProvider().Tracer("") + autoTracer := sdk.TracerProvider().Tracer("") _, span := autoTracer.Start(ctx, "") assert.IsType(t, span, got, "auto span type") }