Adds use of CustomCollector in Prometheus exporter 19/6719/11
authorBenjamin Diaz <bdiaz@whitestack.com>
Wed, 17 Oct 2018 17:44:36 +0000 (14:44 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Thu, 18 Oct 2018 18:12:56 +0000 (15:12 -0300)
Using a CustomCollector gives more control over the collection
process, which allows handling the removal of metrics when a NS
is deleted. Metrics now have a lifespan of a collection cycle, so
metrics of deleted vdus are now not visible in the exporter.

It also adds MonCollector class, which allows to abstract collection
logic and facilitates testing.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Idfdb86c1ee9facd07187e6582954ae4cab32a5b4


No differences found