mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -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 {
|
||||
e.log.Error("Alert Panic", "error", err, "stack", log.Stack(1))
|
||||
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()
|
||||
close(done)
|
||||
}
|
||||
@ -129,7 +132,6 @@ func (e *Engine) processJob(grafanaCtx context.Context, job *Job) error {
|
||||
span.SetTag("alertId", evalContext.Rule.Id)
|
||||
span.SetTag("dashboardId", evalContext.Rule.DashboardId)
|
||||
span.SetTag("firing", evalContext.Firing)
|
||||
|
||||
span.Finish()
|
||||
close(done)
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user