Skip to content

Commit

Permalink
Update sdk/trace/tracer.go
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Yahn <[email protected]>
  • Loading branch information
wildefires and MrAlias authored Aug 25, 2022
1 parent 80dcd38 commit c897c6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/trace/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ var _ trace.Tracer = &tracer{}
func (tr *tracer) Start(ctx context.Context, name string, options ...trace.SpanStartOption) (context.Context, trace.Span) {
config := trace.NewSpanStartConfig(options...)

// If ctx is nil, set to context.Background() as context.WithValue will panic on a nil value.
if ctx == nil {
// Prevent trace.ContextWithSpan from panicking.
ctx = context.Background()
}

Expand Down

0 comments on commit c897c6c

Please sign in to comment.