Skip to content

Commit

Permalink
Backport of Add exporting of Envoy metrics to HCP for linked clusters…
Browse files Browse the repository at this point in the history
… into release/1.4.x (#422)

Add exporting of Envoy metrics to HCP for linked clusters (#370)

* Bump consul/proto-public and create mocks

* Revert some dep changes

* Add changelog

* Init metrics pushing from consul-dataplane

* Add node.id label

* Remove unused field

* Rename worker vars to exporter

* Return a *state in modState

* Bump dependency

* Remove pointer to exporter

* Add mocks in internal/mocks

* Fix test

* Restore directive

* Revert directive

* Rename metrics > scraper, remove unused changelog

* Fix WatchList for new consul api

* Infer auth endpoint if not in state

* debug: expose pprof/runtime metrics

* Handle snapshot end more gracefully

* Fix x-channel header

* Fix path registration

* Try w/o setting handlers

* Use a larger example stats file in envoy_admin_stats_prometheus

* Bump proto-public

* Remove pprof

---------

Co-authored-by: Dan Bond <danbond@protonmail.com>
(cherry picked from commit 3bf86d3)

Co-authored-by: Joshua Timmons <joshua.timmons1@gmail.com>
  • Loading branch information
hc-github-team-consul-core and jjti authored Feb 12, 2024
1 parent 9e1c747 commit 19609ae
Show file tree
Hide file tree
Showing 17 changed files with 5,922 additions and 388 deletions.
3 changes: 3 additions & 0 deletions .changelog/370.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:feature
Add metrics exporting directly to HCP when configured in core.
```
53 changes: 29 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,68 @@ module github.com/hashicorp/consul-dataplane

go 1.20

// This replace directive is needed because `api` requires 0.4.1 of proto-public but we need an unreleased version
replace github.com/hashicorp/consul/proto-public v0.4.1 => github.com/hashicorp/consul/proto-public v0.1.2-0.20240207215339-2456fe5148bd

require (
dario.cat/mergo v1.0.0
github.com/armon/go-metrics v0.4.1
github.com/hashi-derek/grpc-proxy v0.0.0-20231207191910-191266484d75
github.com/hashicorp/consul-server-connection-manager v0.1.6
github.com/hashicorp/consul/proto-public v0.1.2-0.20240131194705-383d92e9ab27
github.com/hashicorp/consul/proto-public v0.4.1
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-hclog v1.2.2
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-rootcerts v1.0.2
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/hcp-sdk-go v0.77.0
github.com/mitchellh/mapstructure v1.5.0
github.com/prometheus/client_golang v1.13.0
github.com/stretchr/testify v1.8.3
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.30.0
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_model v0.5.0
github.com/prometheus/common v0.44.0
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/pdata v1.0.0
golang.org/x/net v0.18.0
golang.org/x/oauth2 v0.14.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
)

require (
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
github.com/DataDog/datadog-go v4.8.2+incompatible // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
github.com/hashicorp/go-netaddrs v0.1.0 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.26.2 // indirect
k8s.io/apimachinery v0.26.2 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)
Loading

0 comments on commit 19609ae

Please sign in to comment.