vendor: update buildx to latest docker/cli

This version of docker/cli has changes to remove compose-cli wrapper and
move all CLI metrics to OTEL.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2024-05-16 10:04:54 -05:00
parent afcb609966
commit 4fc4bc07ae
15 changed files with 204 additions and 107 deletions

View File

@ -1,11 +1,7 @@
package metricutil
import (
"context"
"github.com/docker/buildx/version"
"github.com/docker/cli/cli/command"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/metric"
)
@ -15,10 +11,3 @@ func Meter(mp metric.MeterProvider) metric.Meter {
return mp.Meter(version.Package,
metric.WithInstrumentationVersion(version.Version))
}
// Shutdown invokes Shutdown on the MeterProvider and then reports any error to the OTEL handler.
func Shutdown(ctx context.Context, mp command.MeterProvider) {
if err := mp.Shutdown(ctx); err != nil {
otel.Handle(err)
}
}