···24242525// SpanContextFromContext retrieves the opentracing.SpanContext set on the context by Middleware
2626func SpanContextFromContext(ctx context.Context) opentracing.SpanContext {
2727- if v := ctx.Value(spanContextKey{}); v == nil {
2727+ if v := ctx.Value(spanContextKey{}); v != nil {
2828 return v.(opentracing.SpanContext)
2929 }
3030 return nil