summaryrefslogtreecommitdiff
path: root/vendor/github.com/uber/jaeger-client-go/tracer.go
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-07-14 17:02:43 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-14 13:41:53 -0400
commit4113d2c2986922cb3a89c9a5ca04366110d505a3 (patch)
tree9898de533dd52b4e0fc5d9c2e147d304356aa35e /vendor/github.com/uber/jaeger-client-go/tracer.go
parentd83077b16c14b05967fa1f92c7067299367a286f (diff)
downloadpodman-4113d2c2986922cb3a89c9a5ca04366110d505a3.tar.gz
podman-4113d2c2986922cb3a89c9a5ca04366110d505a3.tar.bz2
podman-4113d2c2986922cb3a89c9a5ca04366110d505a3.zip
Bump github.com/uber/jaeger-client-go
Bumps [github.com/uber/jaeger-client-go](https://github.com/uber/jaeger-client-go) from 2.24.0+incompatible to 2.25.0+incompatible. - [Release notes](https://github.com/uber/jaeger-client-go/releases) - [Changelog](https://github.com/jaegertracing/jaeger-client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber/jaeger-client-go/compare/v2.24.0...v2.25.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/uber/jaeger-client-go/tracer.go')
-rw-r--r--vendor/github.com/uber/jaeger-client-go/tracer.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/vendor/github.com/uber/jaeger-client-go/tracer.go b/vendor/github.com/uber/jaeger-client-go/tracer.go
index 8a3fc97ab..477c6eae3 100644
--- a/vendor/github.com/uber/jaeger-client-go/tracer.go
+++ b/vendor/github.com/uber/jaeger-client-go/tracer.go
@@ -216,10 +216,10 @@ func (t *Tracer) startSpanWithOptions(
options.StartTime = t.timeNow()
}
- // Predicate whether the given span context is a valid reference
- // which may be used as parent / debug ID / baggage items source
- isValidReference := func(ctx SpanContext) bool {
- return ctx.IsValid() || ctx.isDebugIDContainerOnly() || len(ctx.baggage) != 0
+ // Predicate whether the given span context is an empty reference
+ // or may be used as parent / debug ID / baggage items source
+ isEmptyReference := func(ctx SpanContext) bool {
+ return !ctx.IsValid() && !ctx.isDebugIDContainerOnly() && len(ctx.baggage) == 0
}
var references []Reference
@@ -235,7 +235,7 @@ func (t *Tracer) startSpanWithOptions(
reflect.ValueOf(ref.ReferencedContext)))
continue
}
- if !isValidReference(ctxRef) {
+ if isEmptyReference(ctxRef) {
continue
}
@@ -245,14 +245,17 @@ func (t *Tracer) startSpanWithOptions(
continue
}
- references = append(references, Reference{Type: ref.Type, Context: ctxRef})
+ if ctxRef.IsValid() {
+ // we don't want empty context that contains only debug-id or baggage
+ references = append(references, Reference{Type: ref.Type, Context: ctxRef})
+ }
if !hasParent {
parent = ctxRef
hasParent = ref.Type == opentracing.ChildOfRef
}
}
- if !hasParent && isValidReference(parent) {
+ if !hasParent && !isEmptyReference(parent) {
// If ChildOfRef wasn't found but a FollowFromRef exists, use the context from
// the FollowFromRef as the parent
hasParent = true