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") }