prometheus/haproxy_exporter — pull request #3 by grobie (2014-01-31 15:29:58+00:00)
Title: [WIP] Replace registry after each complete scrape

As there is currently no way to remove metrics from the registry, and as
the prometheus client is expected to change drastically soon, this
change implements a workaround, where a new registry object is build for
every single scrape process. As the exporter only exports gauge metrics,
this shouldn't result in any changes in metric collection.

Background for this change is that haproxy backends change often when
new backends are added or shifted to other haproxy instances. With this
workaround, no more stale metrics will be exposed by the exporter.