mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 08:47:56 +00:00
trace: Add missing log message
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 <james.o.hunt@intel.com>
This commit is contained in:
parent
1858c4da2c
commit
b3ab9cafc1
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user