client: re-enable opentelemetry for buildkit
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
3609f3e541
commit
b92905e175
@ -8,6 +8,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/containerd/containerd/platforms"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
@ -57,10 +58,9 @@ func New(ctx context.Context, host string, cfg Config) (*Client, error) {
|
||||
}
|
||||
opts := []bk.ClientOpt{}
|
||||
|
||||
// FIXME: uncomment when next version of buildkit will be released
|
||||
// if span := trace.SpanFromContext(ctx); span != nil {
|
||||
// opts = append(opts, bk.WithTracerProvider(span.TracerProvider()))
|
||||
// }
|
||||
if span := trace.SpanFromContext(ctx); span != nil {
|
||||
opts = append(opts, bk.WithTracerProvider(span.TracerProvider()))
|
||||
}
|
||||
|
||||
c, err := bk.New(ctx, host, opts...)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user