mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-30 11:44:26 +01:00
runtime: tracing: Change method for adding tags
In later versions of OpenTelemetry label.Any() is deprecated. Create addTag() to handle type assertions of values. Change AddTag() to variadic function that accepts multiple keys and values. Fixes #2547 Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
This commit is contained in:
@@ -35,8 +35,7 @@ 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()
|
||||
katatrace.AddTag(span, "path", hook.Path)
|
||||
katatrace.AddTag(span, "args", hook.Args)
|
||||
katatrace.AddTags(span, "path", hook.Path, "args", hook.Args)
|
||||
|
||||
state := specs.State{
|
||||
Pid: syscall.Gettid(),
|
||||
@@ -93,7 +92,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 {
|
||||
span, ctx := katatrace.Trace(ctx, hookLogger(), "runHooks", hookTracingTags)
|
||||
katatrace.AddTag(span, "type", hookType)
|
||||
katatrace.AddTags(span, "type", hookType)
|
||||
defer span.End()
|
||||
|
||||
for _, hook := range hooks {
|
||||
|
||||
Reference in New Issue
Block a user