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
When support for http/protobuf was added, the OTLP tracing processor
plugin was mistakenly changed to return a raw OTLP exporter instance.
Consequently, the type-assertion to a trace.SpanProcessor inside the
tracing pluigin would panic if the processor plugin was configured.
Modify the OTLP plugin to return a BatchSpanProcessor derived from the
exporter once more.
Signed-off-by: Cory Snider <csnider@mirantis.com>
- insecure.NewCredential was simply wrong. It has to use
otlptracegrpc.WithInsecure to disable TLS.
- context.WithTimeout is nice to have, in case the endpoint is not
correctly configured.
Otherwise, the plugin initialization blocks indefinitely.
- grpc.WithReturnConnectionError is nice to have.
Otherwise, otlptracegrpc.New returns "context deadline exceeded"
without underlying errors.
- TraceSamplingRatio should be 1.0 by default.
Otherwise, users need to configure both io.containerd.internal.v1.tracing
and io.containerd.tracing.processor.v1.otlp.
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>