Alerting: Add Go error message to warning log for screenshots. (#49870) (#49917)

Makes debugging problems with alert screenshotting easier.

(cherry picked from commit 56f40bd413)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-05-31 15:07:57 +02:00
committed by GitHub
co-authored by Joe Blubaugh
parent c73b1787ec
commit 6d107a7f41
+3 -2
View File
@@ -247,10 +247,11 @@ func (st *Manager) setNextState(ctx context.Context, alertRule *ngModels.AlertRu
err := st.maybeTakeScreenshot(ctx, alertRule, currentState, oldState)
if err != nil {
st.log.Warn("Error generating a screenshot for an alert instance.",
st.log.Warn("failed to generate a screenshot for an alert instance",
"alert_rule", alertRule.UID,
"dashboard", alertRule.DashboardUID,
"panel", alertRule.PanelID)
"panel", alertRule.PanelID,
"err", err)
}
st.set(currentState)