Merge pull request #1859 from cmaf/tracing-attributes-1

tracing: Make runtime span attributes more consistent
This commit is contained in:
Chelsea Mafrica
2021-05-31 21:57:58 -07:00
committed by GitHub
15 changed files with 21 additions and 41 deletions

View File

@@ -212,8 +212,7 @@ func (v *virtiofsd) trace(parent context.Context, name string) (otelTrace.Span,
}
tracer := otel.Tracer("kata")
ctx, span := tracer.Start(parent, name)
span.SetAttributes(label.Key("subsystem").String("virtiofds"))
ctx, span := tracer.Start(parent, name, otelTrace.WithAttributes(label.String("source", "runtime"), label.String("package", "virtcontainers"), label.String("subsystem", "virtiofsd")))
return span, ctx
}