Skip to content

Commit 9fb034f

Browse files
committed
Fix "Current requires cgo or $USER set in environment" error
Closes #1756
1 parent e3503d2 commit 9fb034f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/tracing/tracing.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ func NewTracerProvider(ctx context.Context, endpoint, caCert, name, namespace st
110110
opts = append(opts, otlptracegrpc.WithInsecure())
111111
}
112112

113+
if os.Getenv("USER") == "" {
114+
if err := os.Setenv("USER", "descheduler"); err != nil {
115+
klog.ErrorS(err, "failed to set USER environment variable")
116+
}
117+
}
118+
113119
client := otlptracegrpc.NewClient(opts...)
114120

115121
exporter, err := otlptrace.New(ctx, client)

0 commit comments

Comments
 (0)