Migrate from `armon/go-metrics` to `hashicorp/go-metrics`
masterEmitting metrics to armon/go-metrics is deprecated. To migrate to hashicorp/go-metrics, follow these steps:
- Update libraries that consume
armon/go-metricsto consumehashicorp/go-metrics/compatinstead (this typically only requires changing import statements). - Update your application's dependencies to versions that use the compatibility layer.
- Update your application code:
- Replace all imports of
github.com/armon/go-metricswithgithub.com/hashicorp/go-metrics. - Configure your build system to include the
hashicorpmetricsbuild tag.
- Replace all imports of
Once the default behavior of the library switches to hashicorp/go-metrics (expected mid-2025), you can remove the hashicorpmetrics build tag.