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

Makes debugging problems with alert screenshotting easier.
This commit is contained in:
Joe Blubaugh 2022-05-31 20:56:22 +08:00 committed by GitHub
parent 94375592c8
commit 56f40bd413
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)