-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Upgrade to using hashicorp/[email protected] #22080
Open
mkeeler
wants to merge
12
commits into
main
Choose a base branch
from
hashicorp-metrics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This also requires bumping the dependencies for: * memberlist * serf * raft * raft-boltdb/v2
github-actions
bot
added
theme/api
Relating to the HTTP API interface
theme/health-checks
Health Check functionality
theme/config
Relating to Consul Agent configuration, including reloading
theme/connect
Anything related to Consul Connect, Service Mesh, Side Car Proxies
type/ci
Relating to continuous integration (CI) tooling for testing or releases
pr/dependencies
PR specifically updates dependencies of project
theme/envoy/xds
Related to Envoy support
theme/contributing
Additions and enhancements to community contributing materials
theme/internals
Serf, Raft, SWIM, Lifeguard, Anti-Entropy, locking topics
theme/agent-cache
Agent Cache
labels
Jan 16, 2025
mkeeler
added
pr/no-backport
pr/no-changelog
PR does not need a corresponding .changelog entry
labels
Jan 16, 2025
Also prevent usage of hashicorp/go-metrics/compat as that should only be used by libraries.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
pr/dependencies
PR specifically updates dependencies of project
pr/no-backport
pr/no-changelog
PR does not need a corresponding .changelog entry
theme/agent-cache
Agent Cache
theme/api
Relating to the HTTP API interface
theme/config
Relating to Consul Agent configuration, including reloading
theme/connect
Anything related to Consul Connect, Service Mesh, Side Car Proxies
theme/contributing
Additions and enhancements to community contributing materials
theme/envoy/xds
Related to Envoy support
theme/health-checks
Health Check functionality
theme/internals
Serf, Raft, SWIM, Lifeguard, Anti-Entropy, locking topics
type/ci
Relating to continuous integration (CI) tooling for testing or releases
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Migrate Consul to using
hashicorp/go-metrics
instead ofarmon/go-metrics
.This necessarily includes updates to the following dependencies:
raft
raft-boltdb/v2
raft-wal
memberlist
serf
All of those libraries were previously updated to support compatibility with
hashicorp/go-metrics
. In order to get the metrics for those libraries flowing out tohashicorp/go-metrics
, I added thehashicorpmetrics
build tag.This should be a non-functional change but unblocks future go-metrics updates.
I also bumped the
serf
andmemberlist
dependencies within theapi
module. While that module doesn't cause any metrics to be invoked, I wanted to ensure only the latest versions with metrics compatibility would be directly relied upon.Note that
armon/go-metrics
still appears as an indirect dependency in go.mod. This is because of a newcompat
package withinhashicorp/go-metrics
that allow for swapping the underlying metrics module used betweenarmon/go-metrics
andhashicorp/go-metrics
with the build tag.Testing & Reproduction steps
make dev-build
mkdir data
curl localhost:8500/v1/agent/metrics
and then verify metrics are present fromraft
,raft-boltdb/v2
,memberlist
andserf
.rm -rf data/*
to wipe the data directorycurl localhost:8500/v1/agent/metrics
and then verify metrics are present fromraft
,raft-wal
,memberlist
andserf
.In my own testing I have verified that at least one metric from all the affected libraries are still emitted correctly along with normal Consul metrics.
Note the agent is run twice with the different raft log stores to ensure both metrics from boltdb or the WAL are being emitted
PR Checklist