buildx/util/metricutil/metric.go
Jonathan A. Sternberg cf68b5b878
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>
(cherry picked from commit 4fc4bc07ae840a6e96303ac81ac5e11af57c873a)
2024-05-16 12:14:08 -05:00

14 lines
375 B
Go

package metricutil
import (
"github.com/docker/buildx/version"
"go.opentelemetry.io/otel/metric"
)
// Meter returns a Meter from the MetricProvider that indicates the measurement
// comes from buildx with the appropriate version.
func Meter(mp metric.MeterProvider) metric.Meter {
return mp.Meter(version.Package,
metric.WithInstrumentationVersion(version.Version))
}