mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 04:59:58 +00:00
TUN-3375: Upgrade coredns and prometheus dependencies
This commit is contained in:
7
vendor/github.com/opentracing/opentracing-go/gocontext.go
generated
vendored
7
vendor/github.com/opentracing/opentracing-go/gocontext.go
generated
vendored
@@ -7,8 +7,13 @@ type contextKey struct{}
|
||||
var activeSpanKey = contextKey{}
|
||||
|
||||
// ContextWithSpan returns a new `context.Context` that holds a reference to
|
||||
// `span`'s SpanContext.
|
||||
// the span. If span is nil, a new context without an active span is returned.
|
||||
func ContextWithSpan(ctx context.Context, span Span) context.Context {
|
||||
if span != nil {
|
||||
if tracerWithHook, ok := span.Tracer().(TracerContextWithSpanExtension); ok {
|
||||
ctx = tracerWithHook.ContextWithSpanHook(ctx, span)
|
||||
}
|
||||
}
|
||||
return context.WithValue(ctx, activeSpanKey, span)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user