mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 05:45:46 +00:00
1a137c29d6
defaultMetrics was being set at package import time, which meant that it received an instance of the original default. But lib/telemetry.InitTelemetry sets a new global when it is called. This resulted in the metrics being sent nowhere. This commit changes defaultMetrics to be a function, so it will return the global instance when called. Since it is called after InitTelemetry it will return the correct metrics instance.