[v10.4.x] Alerting/Annotations: Prevent panics from composite store jobs from crashing Grafana (#84596)
Alerting/Annotations: Prevent panics from composite store jobs from crashing Grafana (#83459)
* Don't directly use pointer to json
* Don't crash entire process if a store job panics
* Add debug logs when failing to parse/handle Loki entries
(cherry picked from commit af528d2f66)
Co-authored-by: William Wernert <william.wernert@grafana.com>
This commit is contained in:
co-authored by
William Wernert
parent
de5b771270
commit
591cb82b90
@@ -54,6 +54,10 @@ func NewXormStore(cfg *setting.Cfg, l log.Logger, db db.DB, tagService tag.Servi
|
||||
}
|
||||
}
|
||||
|
||||
func (r *xormRepositoryImpl) Type() string {
|
||||
return "sql"
|
||||
}
|
||||
|
||||
func (r *xormRepositoryImpl) Add(ctx context.Context, item *annotations.Item) error {
|
||||
tags := tag.ParseTagPairs(item.Tags)
|
||||
item.Tags = tag.JoinTagPairs(tags)
|
||||
|
||||
Reference in New Issue
Block a user