Merge pull request #1815 from jodh-intel/log-trace-msg

trace: Add missing log message
This commit is contained in:
Jose Carlos Venegas Munoz 2019-06-20 11:35:43 -05:00 committed by GitHub
commit a5b8ff42f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,5 +88,12 @@ func Trace(parent context.Context, name string) (opentracing.Span, context.Conte
span.SetTag("source", "runtime") span.SetTag("source", "runtime")
span.SetTag("component", "cli") 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 return span, ctx
} }