1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-08-24 02:31:12 +00:00

runtime: set tags for trace span

Set tags for trace span in hook.go and remove FIXME.

Fixes: 

Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
bin 2021-09-28 18:00:58 +08:00
parent 05995632c3
commit 46720c61c1

View File

@ -35,11 +35,8 @@ func hookLogger() *logrus.Entry {
func runHook(ctx context.Context, hook specs.Hook, cid, bundlePath string) error {
span, _ := katatrace.Trace(ctx, hookLogger(), "runHook", hookTracingTags)
defer span.End()
// FIXME
// span.LogFields(
// log.String("hook-name", hook.Path),
// log.String("hook-args", strings.Join(hook.Args, " ")))
katatrace.AddTag(span, "path", hook.Path)
katatrace.AddTag(span, "args", hook.Args)
state := specs.State{
Pid: syscall.Gettid(),