mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 12:52:23 +00:00
tracing: Return context in runHooks() span creation
The call to Trace() in runHooks() should return a context so that subsequent calls to runHook() produce properly ordered trace spans. Fixes #2423 Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
This commit is contained in:
parent
bff73de4d3
commit
9586d48254
@ -95,7 +95,7 @@ func runHook(ctx context.Context, hook specs.Hook, cid, bundlePath string) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
func runHooks(ctx context.Context, hooks []specs.Hook, cid, bundlePath, hookType string) error {
|
func runHooks(ctx context.Context, hooks []specs.Hook, cid, bundlePath, hookType string) error {
|
||||||
span, _ := katatrace.Trace(ctx, hookLogger(), "runHooks", hookTracingTags)
|
span, ctx := katatrace.Trace(ctx, hookLogger(), "runHooks", hookTracingTags)
|
||||||
katatrace.AddTag(span, "type", hookType)
|
katatrace.AddTag(span, "type", hookType)
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user