boulder/metrics
Jacob Hoffman-Andrews 0bfb542514 Use fields, not globals, for stats (#2790)
Following up on #2752, we don't need to use global vars for our Prometheus stats. We already have a custom registry plumbed through using Scope objects. In this PR, expose the MustRegister method of that registry through the Scope interface, and move existing global vars to be fields of objects. This should improve testability somewhat.

Note that this has a bit of an unfortunate side effect: two instances of the same stats-using class (e.g. VA) can't use the same Scope object, because their MustRegister calls will conflict. In practice this is fine since we never instantiate duplicates of the the classes that use stats, but it's something we should keep an eye on.

Updates #2733
2017-06-06 12:09:31 -07:00
..
measured_http Collapse switch cases. 2017-05-31 14:17:55 -07:00
mock_metrics Use fields, not globals, for stats (#2790) 2017-06-06 12:09:31 -07:00
auto.go Remove statsd from Boulder (#2752) 2017-05-15 10:19:54 -04:00
auto_test.go Remove statsd from Boulder (#2752) 2017-05-15 10:19:54 -04:00
scope.go Use fields, not globals, for stats (#2790) 2017-06-06 12:09:31 -07:00