feat: add prometheus metrics to database.Store (#7713)

* Adds dbmetrics package and wraps database.Store with a Prometheus HistogramVec of timings.
* Adds Wrappers method to database.Store to avoid double-wrapping interfaces
* Fixes test flake in TestLicensesListFake
This commit is contained in:
Cian Johnston
2023-05-31 06:55:57 -07:00
committed by GitHub
parent 00a30775bc
commit 784696dfa5
10 changed files with 1641 additions and 8 deletions

View File

@ -3233,3 +3233,17 @@ func (mr *MockStoreMockRecorder) UpsertServiceBanner(arg0, arg1 interface{}) *go
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertServiceBanner", reflect.TypeOf((*MockStore)(nil).UpsertServiceBanner), arg0, arg1)
}
// Wrappers mocks base method.
func (m *MockStore) Wrappers() []string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Wrappers")
ret0, _ := ret[0].([]string)
return ret0
}
// Wrappers indicates an expected call of Wrappers.
func (mr *MockStoreMockRecorder) Wrappers() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wrappers", reflect.TypeOf((*MockStore)(nil).Wrappers))
}