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
This commit is contained in:
1 parent
9190fb28e8
commit
af528d2f66
7 files changed
+116
-9
No files matched your search
@@ -38,7 +38,7 @@ func ProvideService(
|
||||
historianStore := loki.NewLokiHistorianStore(cfg.UnifiedAlerting.StateHistory, features, db, log.New("annotations.loki"))
|
||||
if historianStore != nil {
|
||||
l.Debug("Using composite read store")
|
||||
read = NewCompositeStore(xormStore, historianStore)
|
||||
read = NewCompositeStore(log.New("annotations.composite"), xormStore, historianStore)
|
||||
} else {
|
||||
l.Debug("Using xorm read store")
|
||||
read = write
|
||||
|
||||
Reference in new issue
Block a user