Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
trace: Add missing log message
Browse files Browse the repository at this point in the history
Add a log message for every trace span created, required by the tracing
tests to validate tracing is working.

Fixes: #1814.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Jun 19, 2019
1 parent 1858c4d commit b3ab9ca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/katautils/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,12 @@ func Trace(parent context.Context, name string) (opentracing.Span, context.Conte
span.SetTag("source", "runtime")
span.SetTag("component", "cli")

// This is slightly confusing: when tracing is disabled, trace spans
// are still created - but the tracer used is a NOP. Therefore, only
// display the message when tracing is really enabled.
if tracing {
kataUtilsLogger.Debugf("created span %v", span)
}

return span, ctx
}

0 comments on commit b3ab9ca

Please sign in to comment.