display notifications
This commit is contained in:
1 parent
0052822e49
commit
5d8bbcd756
5 files changed
+143
-1
No files matched your search
@@ -33,6 +33,7 @@ type Config struct {
|
||||
// Muted, when set, reports issues a person ignored; their spikes never alert.
|
||||
Muted func(issueID string) bool
|
||||
WebhookURL, WebhookSecret string
|
||||
AODURL string
|
||||
}
|
||||
|
||||
func ConfigFromEnv() Config {
|
||||
@@ -52,6 +53,7 @@ func ConfigFromEnv() Config {
|
||||
TelegramThreadID: os.Getenv("OTEL_ALERT_TELEGRAM_THREAD_ID"),
|
||||
WebhookURL: os.Getenv("OTEL_ALERT_WEBHOOK_URL"),
|
||||
WebhookSecret: os.Getenv("OTEL_ALERT_WEBHOOK_SECRET"),
|
||||
AODURL: os.Getenv("OTEL_ALERT_AOD_URL"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +90,9 @@ func (c Config) Notifiers() []Notifier {
|
||||
if c.WebhookURL != "" {
|
||||
out = append(out, &Webhook{URL: c.WebhookURL, Secret: c.WebhookSecret, BaseURL: c.BaseURL})
|
||||
}
|
||||
if c.AODURL != "" {
|
||||
out = append(out, &AlwaysOnDisplay{URL: c.AODURL})
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user