display notifications
Build and Publish / Metadata (push) Successful in 12s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 2m2s

This commit is contained in:
mats committed 2026-09-23 10:58:42 +02:00
1 parent 0052822e49
commit 5d8bbcd756
5 files changed
+143 -1

No files matched your search

+5
View File
@@ -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
}