grafana/pkg/services/ngalert/state
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
..
historian Alerting/Annotations: Add annotation backend for Loki alert state history (#78156) 2024-01-10 18:42:35 -05:00
template Chore: Upgrade Go to 1.21.3 (#77304) 2023-11-01 09:17:38 -07:00
cache_bench_test.go Alerting: Improve performance of cache.getOrCreate (#63909) 2023-06-15 09:37:47 -04:00
cache_test.go Chore: Replace go-multierror with errors package (#66432) 2023-06-19 12:29:45 +03:00
cache.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00
compat_test.go Alerting: Fix NoData & Error alerts not resolving when rule is reset (#80184) 2024-01-09 14:47:19 -05:00
compat.go Alerting: Fix NoData & Error alerts not resolving when rule is reset (#80184) 2024-01-09 14:47:19 -05:00
image_mock.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
manager_bench_test.go Alerting: Make alert state history Loki http client public (#78291) 2023-11-27 09:20:50 -05:00
manager_private_test.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00
manager_test.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00
manager.go Alerting: Fix NoData & Error alerts not resolving when rule is reset (#80184) 2024-01-09 14:47:19 -05:00
persist.go Alerting: Remove and revert flag alertingBigTransactions (#65976) 2023-04-06 18:06:25 +02:00
state_test.go Alerting/Annotations: Add annotation backend for Loki alert state history (#78156) 2024-01-10 18:42:35 -05:00
state.go Alerting/Annotations: Add annotation backend for Loki alert state history (#78156) 2024-01-10 18:42:35 -05:00
testing.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00