mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-21 16:24:22 +01:00
tracing: Consolidate tracing into a new katatrace package
Removes custom trace functions defined across the repo and creates a single trace function in a new katatrace package. Also moves span tag management into this package and provides a function to dynamically add a tag at runtime, such as a container id, etc. Fixes #1162 Signed-off-by: Benjamin Porter <bporter816@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||
"github.com/kata-containers/kata-containers/src/runtime/pkg/katautils/katatrace"
|
||||
vc "github.com/kata-containers/kata-containers/src/runtime/virtcontainers"
|
||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
||||
exp "github.com/kata-containers/kata-containers/src/runtime/virtcontainers/experimental"
|
||||
@@ -28,11 +29,6 @@ const (
|
||||
defaultHypervisor = vc.QemuHypervisor
|
||||
)
|
||||
|
||||
var (
|
||||
// if true, enable opentracing support.
|
||||
tracing = false
|
||||
)
|
||||
|
||||
// The TOML configuration file contains a number of sections (or
|
||||
// tables). The names of these tables are in dotted ("nested table")
|
||||
// form:
|
||||
@@ -1116,7 +1112,7 @@ func LoadConfiguration(configPath string, ignoreLogging bool) (resolvedConfigPat
|
||||
}
|
||||
|
||||
config.Trace = tomlConf.Runtime.Tracing
|
||||
tracing = config.Trace
|
||||
katatrace.SetTracing(config.Trace)
|
||||
|
||||
if tomlConf.Runtime.InterNetworkModel != "" {
|
||||
err = config.InterNetworkModel.SetModel(tomlConf.Runtime.InterNetworkModel)
|
||||
|
||||
Reference in New Issue
Block a user