composer: glitchtip integration
This commit is contained in:
parent
95b4979d88
commit
c9c51613a4
63 changed files with 8857 additions and 220 deletions
|
|
@ -21,6 +21,7 @@ type ComposerConfigFile struct {
|
|||
SplunkHost string `env:"SPLUNK_HEC_HOST"`
|
||||
SplunkPort string `env:"SPLUNK_HEC_PORT"`
|
||||
SplunkToken string `env:"SPLUNK_HEC_TOKEN"`
|
||||
GlitchTipDSN string `env:"GLITCHTIP_DSN"`
|
||||
}
|
||||
|
||||
type KojiAPIConfig struct {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/coreos/go-systemd/activation"
|
||||
"github.com/getsentry/sentry-go"
|
||||
slogger "github.com/osbuild/osbuild-composer/pkg/splunk_logger"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
|
@ -70,6 +71,17 @@ func main() {
|
|||
logrus.AddHook(hook)
|
||||
}
|
||||
|
||||
if config.GlitchTipDSN != "" {
|
||||
err = sentry.Init(sentry.ClientOptions{
|
||||
Dsn: config.GlitchTipDSN,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
} else {
|
||||
logrus.Warn("GLITCHTIP_DSN not configured, skipping initializing Sentry/Glitchtip")
|
||||
}
|
||||
|
||||
stateDir, ok := os.LookupEnv("STATE_DIRECTORY")
|
||||
if !ok {
|
||||
logrus.Fatal("STATE_DIRECTORY is not set. Is the service file missing StateDirectory=?")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue