mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 22:43:05 +00:00
tracing: Add span name to logging error
Add span name to logging error to help with debugging when the context is not set before the span is created. Fixes #3289 Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
This commit is contained in:
parent
39cf2b27c1
commit
1653dd4a30
@ -130,7 +130,7 @@ func Trace(parent context.Context, logger *logrus.Entry, name string, tags ...ma
|
||||
if logger == nil {
|
||||
logger = kataTraceLogger
|
||||
}
|
||||
logger.WithField("type", "bug").Error("trace called before context set")
|
||||
logger.WithField("type", "bug").WithField("name", name).Error("trace called before context set")
|
||||
parent = context.Background()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user