Alerting: Attach screenshot data to Slack notifications. (#49374)

This change extracts screenshot data from alert messages via a private annotation `__alertScreenshotToken__` and attaches a URL to a Slack message or uploads the data to an image upload endpoint if needed.

This change also implements a few foundational functions for use in other notifiers.
This commit is contained in:
Joe Blubaugh
2022-05-23 14:24:20 +08:00
committed by GitHub
parent 5645d7a5e3
commit 12c25759da
11 changed files with 263 additions and 42 deletions
@@ -475,7 +475,7 @@ func (m *migration) validateAlertmanagerConfig(orgID int64, config *PostableUser
if !exists {
return fmt.Errorf("notifier %s is not supported", gr.Type)
}
factoryConfig, err := channels.NewFactoryConfig(cfg, nil, decryptFunc, nil)
factoryConfig, err := channels.NewFactoryConfig(cfg, nil, decryptFunc, nil, nil)
if err != nil {
return err
}