Alerting: Contextual log provider for rule key (#57476)

* create contextual log context provider
* use contextual provider in scheduler
* init logger in the package
* use context for log context
* use context in state manager
This commit is contained in:
Yuriy Tseretyan
2022-10-26 19:16:02 -04:00
committed by GitHub
parent 59ffd9571e
commit 0a4121cef8
9 changed files with 33 additions and 15 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ func (api *API) RegisterAPIEndpoints(m *metrics.API) {
ac: api.AccessControl,
}
evaluator := eval.NewEvaluator(api.Cfg, log.New("ngalert.eval"), api.DatasourceCache, api.ExpressionService)
evaluator := eval.NewEvaluator(api.Cfg, api.DatasourceCache, api.ExpressionService)
// Register endpoints for proxying to Alertmanager-compatible backends.
api.RegisterAlertmanagerApiEndpoints(NewForkingAM(