Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
9.10.0: Always initialise GovukPrometheusExporter.
Some client apps have started to assume that the Prometheus "exporter" process (i.e. the process that aggregates counters in multi-process apps) is always available, including in tests. Now that we handle the case where the `/metrics` port is already taken, there's really no reason not to initialise GovukPrometheusExporter. Remove the confusing heuristics in `GovukPrometheusExporter.should_configure` and just always attempt to initialise unless we're running under `rails console`. When the init fails, we just print a warning and continue anyway, so this should be a net win for robustness. If we find edge cases where this still needs to be configurable then I propose we address those if/when we find and understand them. I expect we won't need to, though.
- Loading branch information