Skip to content

Commit

Permalink
Update use of auto/sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Nov 7, 2024
1 parent 3788415 commit 816bb50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/global/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/global/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

0 comments on commit 816bb50

Please sign in to comment.