mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 04:34:23 -06:00
better formating for error trace
This commit is contained in:
parent
d55b49b7b7
commit
bc678899f7
@ -117,7 +117,10 @@ func (e *Engine) processJob(grafanaCtx context.Context, job *Job) error {
|
|||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
e.log.Error("Alert Panic", "error", err, "stack", log.Stack(1))
|
e.log.Error("Alert Panic", "error", err, "stack", log.Stack(1))
|
||||||
ext.Error.Set(span, true)
|
ext.Error.Set(span, true)
|
||||||
span.LogFields(tlog.Error(fmt.Errorf("error: %v", err)))
|
span.LogFields(
|
||||||
|
tlog.Error(fmt.Errorf("%v", err)),
|
||||||
|
tlog.String("message", "failed to execute alert rule. panic was recovered."),
|
||||||
|
)
|
||||||
span.Finish()
|
span.Finish()
|
||||||
close(done)
|
close(done)
|
||||||
}
|
}
|
||||||
@ -129,7 +132,6 @@ func (e *Engine) processJob(grafanaCtx context.Context, job *Job) error {
|
|||||||
span.SetTag("alertId", evalContext.Rule.Id)
|
span.SetTag("alertId", evalContext.Rule.Id)
|
||||||
span.SetTag("dashboardId", evalContext.Rule.DashboardId)
|
span.SetTag("dashboardId", evalContext.Rule.DashboardId)
|
||||||
span.SetTag("firing", evalContext.Firing)
|
span.SetTag("firing", evalContext.Firing)
|
||||||
|
|
||||||
span.Finish()
|
span.Finish()
|
||||||
close(done)
|
close(done)
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user