Add tracing spans in CRI image service and pull.go
Signed-off-by: Swagat Bora <sbora@amazon.com> Add spans around image unpack operations Use image.ref to denote image name and image.id for the image config digest Add top-level spand and record errors in the CRI instrumentation service
This commit is contained in:
@@ -92,6 +92,11 @@ const (
|
||||
|
||||
// runtimeRunhcsV1 is the runtime type for runhcs.
|
||||
runtimeRunhcsV1 = "io.containerd.runhcs.v1"
|
||||
|
||||
// name prefix for CRI server specific spans
|
||||
criServerSpanPrefix = "pkg.cri.server"
|
||||
|
||||
spanDelimiter = "."
|
||||
)
|
||||
|
||||
// makeSandboxName generates sandbox name from sandbox metadata. The name
|
||||
@@ -510,3 +515,10 @@ func copyResourcesToStatus(spec *runtimespec.Spec, status containerstore.Status)
|
||||
}
|
||||
return status
|
||||
}
|
||||
|
||||
func makeSpanName(funcName string) string {
|
||||
return strings.Join([]string{
|
||||
criServerSpanPrefix,
|
||||
funcName,
|
||||
}, spanDelimiter)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user