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:
Chelsea Mafrica
2021-09-10 15:01:31 -07:00
parent f611785fdc
commit 09d5d8836b
7 changed files with 93 additions and 26 deletions

View File

@@ -822,8 +822,7 @@ func (s *Sandbox) createNetwork(ctx context.Context) error {
NetNsCreated: s.config.NetworkConfig.NetNsCreated,
}
katatrace.AddTag(span, "networkNS", s.networkNS)
katatrace.AddTag(span, "NetworkConfig", s.config.NetworkConfig)
katatrace.AddTags(span, "networkNS", s.networkNS, "NetworkConfig", s.config.NetworkConfig)
// In case there is a factory, network interfaces are hotplugged
// after vm is started.