Merge pull request #7541 from JohnJAS/defect1

containerd should not print error log that failed to init a tracing processor while the tracing plugin is not loaded
This commit is contained in:
Phil Estes 2022-10-18 10:23:36 -04:00 committed by GitHub
commit b2b24d4f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,11 @@ func newTracer(ic *plugin.InitContext) (io.Closer, error) {
for id, pctx := range ls {
p, err := pctx.Instance()
if err != nil {
if plugin.IsSkipPlugin(err) {
log.G(ctx).WithError(err).Infof("skipping tracing processor initialization (no tracing plugin)")
} else {
log.G(ctx).WithError(err).Errorf("failed to initialize a tracing processor %q", id)
}
continue
}
proc := p.(sdktrace.SpanProcessor)