cli/command: remove dependency on distribution/uuid

This uuid package was introduced in 89db01ef97,
but we want to reduce dependency on the old docker/distribution module.

Replace it with google/uuid, which is a commonly used module for this
and already a dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-03-01 01:59:57 +01:00
parent 3f154adf70
commit fda7da2303
3 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ import (
"sync"
"time"
"github.com/docker/distribution/uuid"
"github.com/google/uuid"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/metric"
sdkmetric "go.opentelemetry.io/otel/sdk/metric"
@ -142,7 +142,7 @@ func defaultResourceOptions() []resource.Option {
// of the CLI is its own instance. Without this, downstream
// OTEL processors may think the same process is restarting
// continuously.
semconv.ServiceInstanceID(uuid.Generate().String()),
semconv.ServiceInstanceID(uuid.NewString()),
),
resource.WithFromEnv(),
resource.WithTelemetrySDK(),