Adding tests for error cases in metric_store.go. This will primarily
protect against regression.
Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
Making metrics expiration TTL configurable globally configurable.
This is so RemoveExpired can be tested. Not making the TTL configurable
per metric yet because it could change behaviour in production.
Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
Testing that metrics get removed once expired. Tests are failing
because metric.TTL isn't configurable at the moment
Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
Adding test cases to insert/list/get a namespaced and a non-namespaced
resource metric
Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
* feat: expose basic go metrics via prometheus
Signed-off-by: Martin Linkhorst <martin.linkhorst@zalando.de>
* feat: expose basic counter of successful and failed collections and updates
Signed-off-by: Martin Linkhorst <martin.linkhorst@zalando.de>