grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
60.95k stars 11.63k forks source link

Alerting: use logger with same context within rule scheduling loop #87934

Closed yuri-tceretian closed 2 weeks ago

yuri-tceretian commented 2 weeks ago

This fixes log message https://github.com/grafana/grafana/blame/4b24019bae4f4a8bca9eb620e1afda49c5923ce4/pkg/services/ngalert/schedule/schedule.go#L293 that put rule UID into the message context with label "uid". However, everywhere else we use "rule_uid" label.

This PR makes all messages within the loop that schedules rule evaluations use the same logger with pre-loaded context.

grafana-delivery-bot[bot] commented 2 weeks ago

This PR must be merged before a backport PR will be created.