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 #315

Merged
merged 5 commits into from
Jan 8, 2025
Merged

Conversation

mkeeler
Copy link
Member

@mkeeler mkeeler commented Dec 18, 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

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

Using tag hashicorpmetrics will result in the library utilizing the updated github.com/hashicorp/go-metrics for metrics emission.
@mkeeler mkeeler marked this pull request as ready for review January 8, 2025 15:14
@mkeeler mkeeler requested a review from a team as a code owner January 8, 2025 15:14
@mkeeler mkeeler merged commit 2df46fe into master Jan 8, 2025
9 checks passed
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.

2 participants