mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-12 13:22:28 +00:00
tracing: Unbreak tracing test
Force Jaeger to log when it reports traces to ensure the tracing test [1] works as expected. Fixes: #2264. [1] - https://github.com/kata-containers/tests/blob/master/tracing/tracing-test.sh Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
562d9fd5c2
commit
330cc72ef3
@ -44,6 +44,14 @@ func CreateTracer(name string) (opentracing.Tracer, error) {
|
||||
Type: "const",
|
||||
Param: 1,
|
||||
},
|
||||
|
||||
// Ensure that Jaeger logs each span.
|
||||
// This is essential as it is used by:
|
||||
//
|
||||
// https: //github.com/kata-containers/tests/blob/master/tracing/tracing-test.sh
|
||||
Reporter: &config.ReporterConfig{
|
||||
LogSpans: tracing,
|
||||
},
|
||||
}
|
||||
|
||||
logger := traceLogger{}
|
||||
@ -92,6 +100,8 @@ func Trace(parent context.Context, name string) (opentracing.Span, context.Conte
|
||||
// are still created - but the tracer used is a NOP. Therefore, only
|
||||
// display the message when tracing is really enabled.
|
||||
if tracing {
|
||||
// This log message is *essential*: it is used by:
|
||||
// https: //github.com/kata-containers/tests/blob/master/tracing/tracing-test.sh
|
||||
kataUtilsLogger.Debugf("created span %v", span)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user