fix: otel not working without USER
This commit is contained in:
parent
ad566ee9ef
commit
c5ed376d5f
127 changed files with 347 additions and 305 deletions
15
pkg/observability/observability.go
Normal file
15
pkg/observability/observability.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package observability
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func EnsureUserEnvVar() error {
|
||||
if os.Getenv("USER") == "" {
|
||||
if err := os.Setenv("USER", "traefik"); err != nil {
|
||||
return fmt.Errorf("could not set USER environment variable: %w", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue