mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00

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>
14 lines
375 B
Go
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))
|
|
}
|