Skip to content

Commit

Permalink
osbuild-composer: activate deployment-channel reporting for splunk
Browse files Browse the repository at this point in the history
followup of PR #4285
  • Loading branch information
schuellerf committed Aug 12, 2024
1 parent 8cfba81 commit 09c5f5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/osbuild-composer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ func main() {
logrus.Fatalf("Error printing configuration: %v", err)
}

if config.DeploymentChannel != "" {
logrus.AddHook(&common.EnvironmentHook{Channel: config.DeploymentChannel})
}

if config.SplunkHost != "" {
hook, err := slogger.NewSplunkHook(context.Background(), config.SplunkHost, config.SplunkPort, config.SplunkToken, "osbuild-composer")

Expand All @@ -110,10 +114,6 @@ func main() {
logrus.Warn("GLITCHTIP_DSN not configured, skipping initializing Sentry/Glitchtip")
}

if config.DeploymentChannel != "" {
logrus.AddHook(&common.EnvironmentHook{Channel: config.DeploymentChannel})
}

stateDir, ok := os.LookupEnv("STATE_DIRECTORY")
if !ok {
logrus.Fatal("STATE_DIRECTORY is not set. Is the service file missing StateDirectory=?")
Expand Down

0 comments on commit 09c5f5e

Please sign in to comment.