runtime: migrate from opentracing to opentelemetry

This commit includes two changes:
- migrate from opentracing to opentelemetry
- add jaeger configuration items

Fixes: #1351

Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
bin
2021-02-02 21:51:04 +08:00
parent 6be910bdc1
commit 17df9b119d
476 changed files with 50441 additions and 25819 deletions

View File

@@ -23,6 +23,7 @@ import (
clientUtils "github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/agent/protocols/client"
"github.com/pkg/errors"
"github.com/urfave/cli"
"go.opentelemetry.io/otel/label"
)
const (
@@ -68,22 +69,25 @@ var kataExecCLICommand = cli.Command{
return err
}
span, _ := katautils.Trace(ctx, subCommandName)
defer span.Finish()
defer span.End()
endPoint := context.String(paramKataMonitorAddr)
if endPoint == "" {
endPoint = defaultParamKataMonitorAddr
}
span.SetAttributes(label.Key("endPoint").String(endPoint))
port := context.Uint64(paramDebugConsolePort)
if port == 0 {
port = defaultKernelParamDebugConsoleVPortValue
}
span.SetAttributes(label.Key("port").Uint64(port))
sandboxID := context.Args().Get(0)
if sandboxID == "" {
return fmt.Errorf("SandboxID not found")
}
span.SetAttributes(label.Key("sandbox").String(sandboxID))
conn, err := getConn(endPoint, sandboxID, port)
if err != nil {