Upgrade to using hashicorp/go-metrics@v0.5.4

This also requires bumping the dependencies for:

* memberlist
* serf
* raft
* raft-boltdb/v2

Tidy up other submodules

Fixup a few ci jobs where build tag was missing.

Add tagging to the lint-enums job

Update linting rules to disallow usage of armon/go-metrics

Also prevent usage of hashicorp/go-metrics/compat as that should only be used by libraries.

Dont use the deprecated -tags option to enumcover

Try to get the tags passed through correctly.

Fix serf config cloning test due to new field present in the config.

Attempt to get build tags flowing properly when utilizing gotestsum splitting.

More quoting

One more attempt at passing build tags in GOFLAGS

Add tags to the golden file checker
pull/22080/head
Matt Keeler 2025-01-16 14:45:45 -05:00
parent f82f5207a1
commit 93e29a7992
122 changed files with 621 additions and 636 deletions

View File

@ -14,7 +14,7 @@ permissions:
contents: read
env:
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOPRIVATE: github.com/hashicorp # Required for enterprise deps
concurrency:

View File

@ -134,6 +134,7 @@ jobs:
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }}
CGO_ENABLED: "0"
GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}"
GOTAGS: hashicorpmetrics
uses: hashicorp/actions-go-build@make-clean-flag-optional
with:
product_name: ${{ env.PKG_NAME }}
@ -145,7 +146,7 @@ jobs:
clean: false
instructions: |-
cp LICENSE $TARGET_DIR/LICENSE.txt
go build -ldflags="$GOLDFLAGS" -o "$BIN_PATH" -trimpath -buildvcs=false
go build -ldflags="$GOLDFLAGS" -tags="$GOTAGS" -o "$BIN_PATH" -trimpath -buildvcs=false
- name: Copy license file
if: ${{ !endsWith(github.repository, '-enterprise') }}
@ -235,6 +236,7 @@ jobs:
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }}
CGO_ENABLED: "0"
GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}"
GOTAGS: hashicorpmetrics
uses: hashicorp/actions-go-build@make-clean-flag-optional
with:
product_name: ${{ env.PKG_NAME }}
@ -246,7 +248,7 @@ jobs:
clean: false
instructions: |-
cp LICENSE $TARGET_DIR/LICENSE.txt
go build -ldflags="$GOLDFLAGS" -o "$BIN_PATH" -trimpath -buildvcs=false
go build -ldflags="$GOLDFLAGS" -tags="$GOTAGS" -o "$BIN_PATH" -trimpath -buildvcs=false
build-docker:
name: Docker ${{ matrix.arch }} build

View File

@ -115,6 +115,8 @@ jobs:
- setup
- get-go-version
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
env:
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'hashicorpmetrics,consulent' || 'hashicorpmetrics' }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
@ -124,7 +126,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- run: go install github.com/reillywatson/enumcover/cmd/enumcover@master && enumcover ./...
- run: go install github.com/reillywatson/enumcover/cmd/enumcover@master && GOFLAGS="-tags=${GOTAGS}" enumcover ./...
lint-container-test-deps:
needs:

View File

@ -14,6 +14,9 @@ on:
- main
- release/*
env:
GOFLAGS: -tags=hashicorpmetrics
jobs:
get-go-version:
uses: ./.github/workflows/reusable-get-go-version.yml

View File

@ -12,7 +12,7 @@ on:
env:
TEST_RESULTS_DIR: /tmp/test-results
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTESTSUM_VERSION: "1.10.1"
CONSUL_BINARY_UPLOAD_NAME: consul-bin
# strip the hashicorp/ off the front of github.repository for consul

View File

@ -13,7 +13,7 @@ env:
TEST_RESULTS_DIR: /tmp/test-results
TEST_RESULTS_ARTIFACT_NAME: test-results
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTESTSUM_VERSION: "1.11.0"
CONSUL_BINARY_UPLOAD_NAME: consul-bin
# strip the hashicorp/ off the front of github.repository for consul

View File

@ -13,7 +13,7 @@ env:
TEST_RESULTS_DIR: /tmp/test-results
TEST_RESULTS_ARTIFACT_NAME: test-results
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTESTSUM_VERSION: "1.11.0"
CONSUL_BINARY_UPLOAD_NAME: consul-bin
# strip the hashicorp/ off the front of github.repository for consul

View File

@ -13,7 +13,7 @@ env:
TEST_RESULTS_DIR: /tmp/test-results
TEST_RESULTS_ARTIFACT_NAME: test-results
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTESTSUM_VERSION: "1.11.0"
CONSUL_BINARY_UPLOAD_NAME: consul-bin
# strip the hashicorp/ off the front of github.repository for consul

View File

@ -13,7 +13,7 @@ env:
TEST_RESULTS_DIR: /tmp/test-results
TEST_RESULTS_ARTIFACT_NAME: test-results
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTESTSUM_VERSION: "1.11.0"
CONSUL_BINARY_UPLOAD_NAME: consul-bin
# strip the hashicorp/ off the front of github.repository for consul

View File

@ -13,7 +13,7 @@ env:
TEST_RESULTS_DIR: /tmp/test-results
TEST_RESULTS_ARTIFACT_NAME: test-results
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTESTSUM_VERSION: "1.11.0"
CONSUL_BINARY_UPLOAD_NAME: consul-bin
# strip the hashicorp/ off the front of github.repository for consul

View File

@ -24,6 +24,10 @@ on:
secrets:
elevated-github-token:
required: true
env:
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
jobs:
build:
runs-on: 'windows-2019'
@ -39,7 +43,7 @@ jobs:
- name: Build
env:
GOARCH: ${{ inputs.goarch }}
run: go build .
run: go build -tags="$GOTAGS" .
# save dev build to pass to downstream jobs
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:

View File

@ -21,7 +21,7 @@ on:
elevated-github-token:
required: true
env:
GOTAGS: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
GOTAGS: hashicorpmetrics "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
GOARCH: ${{inputs.go-arch}}
GOPRIVATE: github.com/hashicorp # Required for enterprise deps

View File

@ -53,7 +53,8 @@ env:
GOARCH: ${{inputs.go-arch}}
TOTAL_RUNNERS: ${{inputs.runner-count}}
CONSUL_LICENSE: ${{secrets.consul-license}}
GOTAGS: ${{ inputs.go-tags}}
GOTAGS: hashicorpmetrics,${{ inputs.go-tags }}
GOFLAGS: "-tags=hashicorpmetrics,${{ inputs.go-tags }}"
GOPRIVATE: github.com/hashicorp # Required for enterprise deps
DATADOG_API_KEY: ${{secrets.datadog-api-key}}
@ -119,7 +120,7 @@ jobs:
run: chmod +x $GITHUB_WORKSPACE/${{inputs.directory}}/consul
- run: go env
- name: Run tests
working-directory: ${{inputs.directory}}
working-directory: ${{inputs.directory}}
run: |
# separate the list
PACKAGE_NAMES="${{ join(matrix.package, ' ') }}"
@ -128,6 +129,7 @@ jobs:
# some tests expect this umask, and arm images have a different default
umask 0022
# Note that the build tags will be used from the GOFLAGS environment variable
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
--format=github-actions \
--format-hide-empty-pkg \
@ -136,7 +138,6 @@ jobs:
--rerun-fails-report=/tmp/gotestsum-rerun-fails \
--packages="$PACKAGE_NAMES" \
--junitfile ${{env.TEST_RESULTS}}/gotestsum-report.xml -- \
-tags="${{env.GOTAGS}}" \
${{inputs.go-test-flags}} \
-cover -coverprofile=coverage.txt \
-timeout=30m

View File

@ -48,7 +48,7 @@ env:
GOTESTSUM_VERSION: "1.11.0"
GOARCH: ${{inputs.go-arch}}
CONSUL_LICENSE: ${{secrets.consul-license}}
GOTAGS: ${{ inputs.go-tags}}
GOTAGS: hashicorpmetrics ${{ inputs.go-tags}}
GOPRIVATE: github.com/hashicorp # Required for enterprise deps
DATADOG_API_KEY: ${{secrets.datadog-api-key}}

View File

@ -23,7 +23,7 @@ env:
TEST_RESULTS_DIR: /tmp/test-results
TEST_RESULTS_ARTIFACT_NAME: test-results
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTAGS: hashicorpmetrics ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
GOTESTSUM_VERSION: "1.11.0"
CONSUL_BINARY_UPLOAD_NAME: consul-bin
# strip the hashicorp/ off the front of github.repository for consul

View File

@ -29,8 +29,8 @@ issues:
text: 'SA1019: "io/ioutil" has been deprecated since Go 1.16'
# Allow usage of deprecated values.
- linters: [ staticcheck ]
text: 'SA1019:'
- linters: [staticcheck]
text: "SA1019:"
path: "(agent/grpc-external|agent/grpc-internal)"
# An argument that always receives the same value is often not a problem.
@ -104,10 +104,14 @@ linters-settings:
main:
listMode: lax
deny:
- pkg: net/rpc
desc: "only use forked copy in github.com/hashicorp/consul-net-rpc/net/rpc"
- pkg: github.com/golang/protobuf
desc: "only use google.golang.org/protobuf"
- pkg: net/rpc
desc: "only use forked copy in github.com/hashicorp/consul-net-rpc/net/rpc"
- pkg: github.com/golang/protobuf
desc: "only use google.golang.org/protobuf"
- pkg: github.com/armon/go-metrics
desc: "use github.com/hashicorp/go-metrics"
- pkg: github.com/hashicorp/go-metrics/compat
desc: "use github.com/hashicorp/go-metrics"
run:
timeout: 10m

View File

@ -27,6 +27,7 @@ GCI_VERSION='v0.11.2'
MOCKED_PB_DIRS= pbdns
GOTAGS ?=
GOTAGS+= hashicorpmetrics
GOPATH=$(shell go env GOPATH)
GOARCH?=$(shell go env GOARCH)
MAIN_GOPATH=$(shell go env GOPATH | cut -d: -f1)

View File

@ -10,7 +10,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
"github.com/hashicorp/go-hclog"

View File

@ -22,8 +22,8 @@ import (
"sync/atomic"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/rboyer/safeio"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"

View File

@ -20,7 +20,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/mitchellh/hashstructure"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View File

@ -9,8 +9,8 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/consul/agent/consul/state"
"github.com/hashicorp/consul/lib"

View File

@ -26,9 +26,9 @@ import (
"sync/atomic"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"golang.org/x/time/rate"
"github.com/hashicorp/consul/acl"

View File

@ -8,8 +8,8 @@ import (
"net/http"
"strings"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
cachetype "github.com/hashicorp/consul/agent/cache-types"
"github.com/hashicorp/consul/agent/structs"

View File

@ -5,7 +5,7 @@
package agent
import "github.com/armon/go-metrics"
import "github.com/hashicorp/go-metrics"
func (s *HTTPHandlers) nodeMetricsLabels() []metrics.Label {
return []metrics.Label{{Name: "node", Value: s.nodeName()}}

View File

@ -21,7 +21,7 @@ import (
"strings"
"time"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics/prometheus"
"golang.org/x/time/rate"
"github.com/hashicorp/go-bexpr"

View File

@ -7,10 +7,10 @@ import (
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/consul/types"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"math/big"
"net"
"net/url"

View File

@ -20,8 +20,8 @@ import (
"testing"
"time"
"github.com/armon/go-metrics/prometheus"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/stretchr/testify/require"
"golang.org/x/time/rate"

View File

@ -10,9 +10,9 @@ import (
"sync"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"golang.org/x/sync/singleflight"
"golang.org/x/time/rate"

View File

@ -11,11 +11,11 @@ import (
"path/filepath"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-bexpr"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/consul/acl"

View File

@ -10,8 +10,8 @@ import (
"fmt"
"time"
metrics "github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
metrics "github.com/hashicorp/go-metrics"
"github.com/hashicorp/consul/agent/structs"
)

View File

@ -7,8 +7,8 @@ import (
"context"
"fmt"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/raft"
autopilot "github.com/hashicorp/raft-autopilot"
"github.com/hashicorp/serf/serf"

View File

@ -10,11 +10,11 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-bexpr"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-uuid"
hashstructure_v2 "github.com/mitchellh/hashstructure/v2"

View File

@ -12,8 +12,8 @@ import (
"sync/atomic"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"golang.org/x/time/rate"
"github.com/hashicorp/go-hclog"

View File

@ -8,7 +8,7 @@ import (
"reflect"
"time"
metrics "github.com/armon/go-metrics"
metrics "github.com/hashicorp/go-metrics"
hashstructure_v2 "github.com/mitchellh/hashstructure/v2"
"github.com/hashicorp/go-bexpr"

View File

@ -8,8 +8,8 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/consul/agent/configentry"

View File

@ -65,6 +65,7 @@ func TestCloneSerfLANConfig(t *testing.T) {
"MemberlistConfig",
"Merge",
"MinQueueDepth",
"MsgpackUseNewTimeFormat",
"NodeName",
"ProtocolVersion",
"QueryBuffer",

View File

@ -7,8 +7,8 @@ import (
"fmt"
"time"
metrics "github.com/armon/go-metrics"
memdb "github.com/hashicorp/go-memdb"
metrics "github.com/hashicorp/go-metrics"
hashstructure_v2 "github.com/mitchellh/hashstructure/v2"
"github.com/hashicorp/consul/acl"

View File

@ -8,9 +8,9 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
memdb "github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul/agent/consul/state"
"github.com/hashicorp/consul/agent/structs"

View File

@ -8,8 +8,8 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul/agent/consul/state"
"github.com/hashicorp/consul/agent/structs"

View File

@ -7,8 +7,8 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-raftchunking"
"github.com/hashicorp/raft"

View File

@ -7,7 +7,7 @@ import (
"fmt"
"sort"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
hashstructure_v2 "github.com/mitchellh/hashstructure/v2"
"github.com/hashicorp/consul/acl"

View File

@ -8,11 +8,11 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-bexpr"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
hashstructure_v2 "github.com/mitchellh/hashstructure/v2"
"github.com/hashicorp/consul/acl"

View File

@ -8,10 +8,10 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/acl/resolver"

View File

@ -13,8 +13,8 @@ import (
"sync/atomic"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"golang.org/x/time/rate"
"github.com/hashicorp/go-hclog"

View File

@ -11,9 +11,9 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul/agent/connect"
"github.com/hashicorp/consul/logging"

View File

@ -12,10 +12,10 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/go-uuid"
"golang.org/x/time/rate"

View File

@ -14,10 +14,10 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/google/tcpproxy"
msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"

View File

@ -8,10 +8,10 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/consul/acl"

View File

@ -13,8 +13,8 @@ import (
"reflect"
"sync/atomic"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"golang.org/x/time/rate"
"github.com/hashicorp/consul/agent/consul/multilimiter"

View File

@ -3,7 +3,7 @@
package rate
import "github.com/armon/go-metrics/prometheus"
import "github.com/hashicorp/go-metrics/prometheus"
var Counters = []prometheus.CounterDefinition{
{

View File

@ -9,9 +9,9 @@ import (
"sync/atomic"
"time"
metrics "github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
metrics "github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"golang.org/x/time/rate"
"github.com/hashicorp/consul/lib/retry"

View File

@ -15,11 +15,11 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-connlimit"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-raftchunking"
"github.com/hashicorp/memberlist"
"github.com/hashicorp/raft"

View File

@ -8,7 +8,7 @@ package consul
import (
"net"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul/agent/structs"
)

View File

@ -19,8 +19,8 @@ import (
"sync/atomic"
"time"
"github.com/armon/go-metrics"
"github.com/fullstorydev/grpchan/inprocgrpc"
"github.com/hashicorp/go-metrics"
"go.etcd.io/bbolt"
"golang.org/x/time/rate"
"google.golang.org/grpc"

View File

@ -10,7 +10,7 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/serf/coordinate"

View File

@ -6,10 +6,10 @@ package consul
import (
"fmt"
"github.com/armon/go-metrics"
"github.com/fullstorydev/grpchan/inprocgrpc"
middleware "github.com/grpc-ecosystem/go-grpc-middleware"
recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
"github.com/hashicorp/go-metrics"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"

View File

@ -11,7 +11,7 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/memberlist"

View File

@ -17,8 +17,8 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/google/tcpproxy"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"golang.org/x/time/rate"

View File

@ -7,10 +7,10 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/consul/acl"

View File

@ -7,8 +7,8 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"

View File

@ -7,9 +7,9 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/acl/resolver"

View File

@ -8,10 +8,10 @@ import (
"errors"
"time"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/serf/serf"
"github.com/hashicorp/consul/agent/consul/state"

View File

@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
"github.com/hashicorp/consul/agent/consul/state"

View File

@ -8,9 +8,9 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/serf/serf"
"github.com/stretchr/testify/assert"

View File

@ -8,10 +8,10 @@ import (
"math"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"golang.org/x/time/rate"
"github.com/hashicorp/consul/agent/structs"

View File

@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
"golang.org/x/time/rate"

View File

@ -16,9 +16,9 @@ import (
"sync/atomic"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-radix"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/miekg/dns"
"github.com/hashicorp/consul/acl"

View File

@ -9,11 +9,11 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
middleware "github.com/grpc-ecosystem/go-grpc-middleware"
recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
"github.com/hashi-derek/grpc-proxy/proxy"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"

View File

@ -8,9 +8,9 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
grpcstatus "google.golang.org/grpc/status"

View File

@ -9,13 +9,13 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/acl/resolver"
"github.com/hashicorp/consul/agent/grpc-external/testutils"
"github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/consul/proto/private/pbconfigentry"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"

View File

@ -12,8 +12,8 @@ import (
"sync"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
grpcstatus "google.golang.org/grpc/status"

View File

@ -9,8 +9,8 @@ import (
"sort"
"testing"
"github.com/armon/go-metrics"
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"

View File

@ -14,7 +14,7 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/keepalive"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/consul/agent/grpc-internal/balancer"
agentmiddleware "github.com/hashicorp/consul/agent/grpc-middleware"

View File

@ -8,7 +8,7 @@ import (
"net"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
agentmiddleware "github.com/hashicorp/consul/agent/grpc-middleware"

View File

@ -9,8 +9,8 @@ import (
"sort"
"testing"
"github.com/armon/go-metrics"
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"

View File

@ -7,8 +7,8 @@ import (
"context"
"sync/atomic"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"google.golang.org/grpc"
"google.golang.org/grpc/stats"
)

View File

@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
)

View File

@ -7,8 +7,8 @@ import (
"context"
"fmt"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"go.opentelemetry.io/otel"
"github.com/hashicorp/consul/agent/hcp/client"

View File

@ -8,7 +8,7 @@ import (
"fmt"
"net/url"
goMetrics "github.com/armon/go-metrics"
goMetrics "github.com/hashicorp/go-metrics"
"go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/metric/aggregation"
"go.opentelemetry.io/otel/sdk/metric/metricdata"

View File

@ -11,7 +11,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/metric/aggregation"

View File

@ -12,7 +12,7 @@ import (
"sync"
"time"
gometrics "github.com/armon/go-metrics"
gometrics "github.com/hashicorp/go-metrics"
"go.opentelemetry.io/otel/attribute"
otelmetric "go.opentelemetry.io/otel/metric"
otelsdk "go.opentelemetry.io/otel/sdk/metric"

View File

@ -12,7 +12,7 @@ import (
"sync"
"testing"
gometrics "github.com/armon/go-metrics"
gometrics "github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/metric"

View File

@ -7,7 +7,7 @@ import (
"errors"
"fmt"
goMetrics "github.com/armon/go-metrics"
goMetrics "github.com/hashicorp/go-metrics"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/metric/metricdata"
cpb "go.opentelemetry.io/proto/otlp/common/v1"

View File

@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel/attribute"

View File

@ -14,9 +14,9 @@ import (
"sync"
"time"
"github.com/armon/go-metrics"
"github.com/go-openapi/runtime"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-retryablehttp"
"github.com/hashicorp/consul/agent/hcp/client"

View File

@ -14,8 +14,8 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/go-openapi/runtime"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

View File

@ -14,7 +14,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View File

@ -22,8 +22,8 @@ import (
"github.com/hashicorp/go-hclog"
"github.com/NYTimes/gziphandler"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"google.golang.org/grpc/codes"

View File

@ -10,8 +10,8 @@ import (
"sync"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"golang.org/x/sync/singleflight"
"golang.org/x/time/rate"

View File

@ -22,9 +22,9 @@ import (
"github.com/hashicorp/consul/lib/stringslice"
"github.com/hashicorp/consul/types"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/go-multierror"
"github.com/mitchellh/copystructure"
)

View File

@ -8,8 +8,8 @@ import (
"fmt"
"time"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul/agent/consul"
"github.com/hashicorp/consul/tlsutil"

View File

@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/assert"
)

View File

@ -9,9 +9,9 @@ import (
"strconv"
"time"
"github.com/armon/go-metrics"
external "github.com/hashicorp/consul/agent/grpc-external"
"github.com/hashicorp/consul/proto/private/pboperator"
"github.com/hashicorp/go-metrics"
multierror "github.com/hashicorp/go-multierror"
"github.com/hashicorp/raft"

View File

@ -10,9 +10,9 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
"github.com/hashicorp/consul-net-rpc/net/rpc"
rpcRate "github.com/hashicorp/consul/agent/consul/rate"

View File

@ -12,9 +12,9 @@ import (
"testing"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/consul/agent/consul/rate"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
)

View File

@ -11,9 +11,9 @@ import (
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-memdb"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-multierror"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"

View File

@ -12,9 +12,9 @@ import (
"sync"
"time"
"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
"github.com/hashicorp/go-metrics/prometheus"
wal "github.com/hashicorp/raft-wal"
"github.com/hashicorp/raft-wal/verifier"
"google.golang.org/grpc/grpclog"

View File

@ -18,7 +18,7 @@ import (
"text/template"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/stretchr/testify/require"
"github.com/hashicorp/go-hclog"

View File

@ -14,10 +14,10 @@ import (
"sync/atomic"
"time"
"github.com/armon/go-metrics"
envoy_config_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
envoy_listener_v3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
envoy_discovery_v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
"github.com/hashicorp/go-metrics"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"

View File

@ -15,7 +15,6 @@ import (
"github.com/hashicorp/consul/envoyextensions/xdscommon"
"github.com/armon/go-metrics"
envoy_cluster_v3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
envoy_listener_v3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
envoy_discovery_v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
@ -29,6 +28,7 @@ import (
"github.com/hashicorp/consul/sdk/testutil/retry"
"github.com/hashicorp/consul/version"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-metrics"
goversion "github.com/hashicorp/go-version"
"github.com/stretchr/testify/require"
rpcstatus "google.golang.org/genproto/googleapis/rpc/status"

Some files were not shown because too many files have changed in this diff Show More