Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Commit

Permalink
fix(tracer): fixed create exit span with context error when current c…
Browse files Browse the repository at this point in the history
…ontext not to be sampled (#135)
  • Loading branch information
Luckyboys authored Nov 17, 2021
1 parent bf966d9 commit ff3fce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ func (t *Tracer) CreateExitSpanWithContext(ctx context.Context, operationName st
if err != nil {
return
}
noopSpan, ok := interface{}(s).(NoopSpan)
noopSpan, ok := interface{}(s).(*NoopSpan)
if ok {
// Ignored, there is no need to inject SW8 in the request header
return &noopSpan, nCtx, nil
return noopSpan, nCtx, nil
}
s.SetPeer(peer)
spanContext := &propagation.SpanContext{}
Expand Down

0 comments on commit ff3fce8

Please sign in to comment.