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:
@@ -202,6 +202,7 @@ func (s *Service) buildDSNode(dp *simple.DirectedGraph, rn *rawNode, req *Reques
|
||||
// other nodes they must have already been executed and their results must
|
||||
// already by in vars.
|
||||
func (dn *DSNode) Execute(ctx context.Context, now time.Time, _ mathexp.Vars, s *Service) (mathexp.Results, error) {
|
||||
logger := logger.FromContext(ctx).New("datasourceType", dn.datasource.Type)
|
||||
dsInstanceSettings, err := adapters.ModelToInstanceSettings(dn.datasource, s.decryptSecureJsonDataFn(ctx))
|
||||
if err != nil {
|
||||
return mathexp.Results{}, fmt.Errorf("%v: %w", "failed to convert datasource instance settings", err)
|
||||
|
||||
Reference in New Issue
Block a user