Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce hashicorp/go-metrics compatibility #631

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

mkeeler
Copy link
Member

@mkeeler mkeeler commented Dec 20, 2024

This PR migrates the library to using github.com/hashicorp/go-metrics/compat instead of github.com/armon/go-metrics.

Applications consuming the library can control whether metrics get emitted to either armon/go-metrics or hashicorp/go-metrics by specifying either the armonmetrics or hashicorpmetrics build tags. The default behavior is currently to prefer armon/go-metrics for maximum backwards compatibility.

Future PRs will:

  • Bump the hashicorp/go-metrics version to one where the default behavior is to emit metrics using hashicorp/go-metrics (Timeline: mid-2025)
  • Remove compat package usage with direct usage of hashicorp/go-metrics (Timeline: end-2025)

TODO:

  • Pull in a tagged version of hashicorp/go-metrics once upstream PR is merged

mkeeler and others added 2 commits December 20, 2024 15:23
Compatability is attained with build tags

Using tag armonmetrics or no tag at all will result in the library utilizing github.com/armon/go-metrics for metrics emission (like the library historically has done)

Using tag hashicorpmetrics will result in the library utilizing the updated github.com/hashicorp/go-metrics for metrics emission.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant