grafana/pkg/services/ngalert/metrics
Alexander Weaver 19d01dff91
Alerting: Expose Prometheus metrics for persisting state history (#63157)
* Create historian metrics and dependency inject

* Record counter for total number of state transitions logged

* Track write failures

* Track current number of active write goroutines

* Record histogram of how long it takes to write history data

* Don't copy the registerer

* Adjust naming of write failures metric

* Introduce WritesTotal to complement WritesFailedTotal

* Measure TransitionsFailedTotal to complement TransitionsTotal

* Rename all to state_history

* Remove redundant Total suffix

* Increment totals all the time, not just on success

* Drop ActiveWriteGoroutines

* Drop PersistDuration in favor of WriteDuration

* Drop unused gauge

* Make writes and writesFailed per org

* Add metric indicating backend and a spot for future metadata

* Drop _batch_ from names and update help

* Add metric for bytes written

* Better pairing of total + failure metric updates

* Few tweaks to wording and naming

* Record info metric during composition

* Create fakeRequester and simple happy path test using it

* Blocking test for the full historian and test for happy path metrics

* Add tests for failure case metrics

* Smoke test for full annotation persistence

* Create test for metrics on annotation persistence, both happy and failing paths

* Address linter complaints

* More linter complaints

* Remove unnecessary whitespace

* Consistency improvements to help texts

* Update tests to match new descs
2023-03-06 10:40:37 -06:00
..
alertmanager.go Alerting: Refactor metrics/ngalert.go into seperate files (#62362) 2023-01-27 18:49:49 +00:00
api.go Alerting: Refactor metrics/ngalert.go into seperate files (#62362) 2023-01-27 18:49:49 +00:00
historian.go Alerting: Expose Prometheus metrics for persisting state history (#63157) 2023-03-06 10:40:37 -06:00
multi_org_alertmanager.go Alerting: Add metrics for active receiver and integrations (#64050) 2023-03-06 16:37:07 +00:00
ngalert.go Alerting: Instrument outgoing state history requests using weaveworks/common (#63600) 2023-02-23 17:52:02 -06:00
scheduler.go Alerting: Add status label to GroupRules metric (#63454) 2023-02-23 12:38:27 +01:00
state.go Alerting: Move rule_groups_rules metric from State to Scheduler. (#63144) 2023-02-09 17:05:19 +01:00
util.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00