grafana/pkg/services/ngalert/eval
William Wernert 48b5ac779b
Alerting/Annotations: Add annotation backend for Loki alert state history (#78156)
* Move scope type vars to testutil package

* Expose parts of state historian for use in annotation backend

* Implement Loki ASH Annotation store

This store will only implement the `Get` method of a RepositoryImpl since alert state history
writes to Loki elsewhere.

* Use interface for Loki HTTP Client

* Add tests for Loki ASH Annotation store

* Add missing test

* Fix lint

* Organize tests

* Add filter tests

* Improve tests

* Move filter logic into outer function

* Fix lint

* Add comment

* Fix tests

* Fix lint

* Rename historian store + refactor

* Cleanup historian store

* Fix tests

* Minor cleanup

* Use new `ShouldRecordAnnotation` filter

* Fix logic and add tests for this check

* Fix typos, remove unused variables, `< 1` -> `== 0`

* More closely mimic RBAC filter from xorm to ensure correct logic

* Move off weaveworks client

* Address PR comments
2024-01-10 18:42:35 -05:00
..
eval_mocks Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
context.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00
eval_bench_test.go Alerting: Improve performance of matching captures (#71828) 2023-07-20 09:07:00 +01:00
eval_test.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00
eval.go Alerting/Annotations: Add annotation backend for Loki alert state history (#78156) 2024-01-10 18:42:35 -05:00
extract_md_test.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
extract_md.go Alerting: Sort NumberCaptureValues in EvaluationString (#71927) 2023-07-19 12:09:21 +01:00
testing.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00