Commit Graph

19834 Commits (75f112c824045ad292d15e4ff8954913582674d6)

Author SHA1 Message Date
hc-github-team-consul-core 75f112c824
Backport of Fix two WAL metrics in docs/agent/telemetry.mdx into release/1.15.x (#17682)
* backport of commit 0191cb1103

* backport of commit 6c245e7960

---------

Co-authored-by: josh <josh.timmons@hashicorp.com>
2023-06-12 18:29:40 -07:00
hc-github-team-consul-core 2c2d4550c4
backport of commit 9ec2b3807a (#17671)
Co-authored-by: Hariram Sankaran <56744845+ramramhariram@users.noreply.github.com>
2023-06-12 16:35:07 -07:00
hc-github-team-consul-core 926067494d
fix: add agent info reporting log (#17661)
Co-authored-by: Poonam Jadhav <poonam.jadhav@hashicorp.com>
2023-06-12 19:10:31 +00:00
hc-github-team-consul-core 7792c27d11
Backport of docs: update the defaults for request limits into release/1.15.x (#17466)
* no-op commit due to failed cherry-picking

* docs: update the defaults for request limits (#17437)

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-06-12 11:26:26 -06:00
hc-github-team-consul-core 51c45ec00a
Backport of chore(website): delete check-legacy-links-format.yml into release/1.15.x (#17649)
* no-op commit due to failed cherry-picking

* remove legacy links format

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Bryce Kalow <bkalow@hashicorp.com>
2023-06-12 09:35:36 -07:00
hc-github-team-consul-core d076d69f39
Backport of CI: do not upload test metrics to datadog on forks into release/1.15.x (#17451)
* backport of commit ce702d7579

* CI: do not upload test metrics to datadog on forks (#17448)

* bypass uploading testmetrics to datadog on forks / when api is not available

* add exclusions to upgrade tests

---------

Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-06-12 16:20:28 +00:00
R.B. Boyer 75451c1490
cache: fix a few minor goroutine leaks in leaf certs and the agent cache (#17636) 2023-06-09 11:27:04 -05:00
hc-github-team-consul-core 08a106c400
Backport of [API Gateway] Fix rate limiting for API gateways into release/1.15.x (#17634)
* backport of commit fb2f3b6100

* backport of commit 178abb8495

* backport of commit 77b3998774

* backport of commit a245b326ac

---------

Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
2023-06-09 12:43:20 +00:00
hc-github-team-consul-core 082de092c6
backport of commit ef688704aa (#17622)
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
2023-06-08 20:55:44 +00:00
hc-github-team-consul-core de037e570a
Backport of [API Gateway] Fix trust domain for external peered services in synthesis code into release/1.15.x (#17615)
* backport of commit 63e8743472

* backport of commit 896f11789b

---------

Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
2023-06-08 16:40:16 +00:00
hc-github-team-consul-core 692bdb6694
fix some testing.T retry.R mixups (#17600) (#17603)
Fix some linter warnings before updating the lint-consul-retry code in hashicorp/lint-consul-retry#4

backport of m #17600 onto release/1.15.x

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
2023-06-07 14:39:35 -05:00
hc-github-team-consul-core 104100d46b
Backport of docs: clarify the behavior of prepending hostname to metrics into release/1.15.x (#17580)
* backport of commit 81fe71d411

* backport of commit 8d6b7070dd

---------

Co-authored-by: cskh <hui.kang@hashicorp.com>
2023-06-06 23:25:01 -04:00
hc-github-team-consul-core 47582d4f45
Backport of Fix subscribing/fetching objects not in the default partition into release/1.15.x (#17583)
* backport of commit 7c2c22129f

* backport of commit fc0053f666

---------

Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
2023-06-06 13:32:05 +00:00
hc-github-team-consul-core db584696fd
Backport of Fix up case where subscription is terminated due to ACLs changing or a snapshot restore occurring into release/1.15.x (#17567)
* backport of commit 82e7d4fe18

* backport of commit 45008e27c3

* backport of commit bdee9e3b98

---------

Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
2023-06-05 17:32:17 +00:00
hc-github-team-consul-core d2a1795176
Backport of add docs for consul-k8s config read command into release/1.15.x (#17473)
* backport of commit 6e537507ef

* backport of commit fbdab01e85

* trigger ci

---------

Co-authored-by: Hans Hasselberg <hans@hashicorp.com>
2023-06-05 08:14:37 -07:00
hc-github-team-consul-core fefcf3ff88
backport of commit a717be7c75 (#17563)
Co-authored-by: Dave Rawks <dave@rawks.io>
2023-06-02 17:23:28 +00:00
hc-github-team-consul-core 084fde4799
backport of commit f2b2bf2343 (#17553)
Co-authored-by: Poonam Jadhav <poonam.jadhav@hashicorp.com>
2023-06-02 13:22:28 +00:00
hc-github-team-consul-core 34431034c1
backport of commit 50e40ecc14 (#17550)
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-06-01 15:53:48 -07:00
Michael Zalimeni 1a155e2302
Update list of Envoy versions (#17545) 2023-06-01 14:50:16 -07:00
hc-github-team-consul-core f3b1433fdb
backport of commit cd05b8b921 (#17543)
Co-authored-by: Dan Stough <Daniel.Stough@gmail.com>
2023-06-01 17:34:44 +00:00
Michael Zalimeni aca09d2f65
Manual backport 1.15.x of Avoid panic applying TProxy Envoy extensions (#17539)
backport of commit 8c30455761
2023-06-01 13:09:15 -04:00
hc-github-team-consul-core 7d94518014
Backport of [API Gateway] Fix use of virtual resolvers in HTTPRoutes into release/1.15.x (#17536)
* backport of commit ee9fd909fc

* backport of commit 6bc25b5bcc

---------

Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
2023-05-31 21:19:56 +00:00
hc-github-team-consul-core f9d3f8a065
Backport of hoststats: add package for collecting host statistics including cpu memory and disk usage into release/1.15.x (#17532)
* backport of commit fafb68b28d

* backport of commit baffef45bd

* backport of commit 369619ba3a

* backport of commit b7f5032136

* backport of commit ac6071721c

* backport of commit 2a3dd5066a

* backport of commit 50621fa098

* backport of commit 6e3ceb0347

* backport of commit bf69a829f2

---------

Co-authored-by: Nick Ethier <nethier@hashicorp.com>
2023-05-31 18:09:13 +00:00
hc-github-team-consul-core d991db50fa
backport of commit 65d5aeaaac (#17531)
Co-authored-by: Poonam Jadhav <poonam.jadhav@hashicorp.com>
2023-05-31 17:48:52 +00:00
hc-github-team-consul-core fe5a963c62
backport of commit 94998bec4b (#17518)
Co-authored-by: Ashvitha Sridharan <ashvitha.sridharan@hashicorp.com>
2023-05-30 18:42:12 +00:00
hc-github-team-consul-core 1330cc0711
backport of commit 87e1f04178 (#17516)
Co-authored-by: DanStough <dan.stough@hashicorp.com>
2023-05-30 17:06:08 +00:00
hc-github-team-consul-core c0ee120dda
backport of commit 2d9ed7c43e (#17510)
Co-authored-by: Morgan Drake <12264057+modrake@users.noreply.github.com>
2023-05-30 15:42:37 +00:00
Ashvitha 4bd3ed96c8
HCP Telemetry Feature (#17460) (#17502)
* Move hcp client to subpackage hcpclient (#16800)

* [HCP Observability] New MetricsClient (#17100)

* Client configured with TLS using HCP config and retry/throttle

* Add tests and godoc for metrics client

* close body after request

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* remove clone

* Extract CloudConfig and mock for future PR

* Switch to hclog.FromContext

* [HCP Observability] OTELExporter (#17128)

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Create new OTELExporter which uses the MetricsClient
Add transform because the conversion is in an /internal package

* Fix lint error

* early return when there are no metrics

* Add NewOTELExporter() function

* Downgrade to metrics SDK version: v1.15.0-rc.1

* Fix imports

* fix small nits with comments and url.URL

* Fix tests by asserting actual error for context cancellation, fix parallel, and make mock more versatile

* Cleanup error handling and clarify empty metrics case

* Fix input/expected naming in otel_transform_test.go

* add comment for metric tracking

* Add a general isEmpty method

* Add clear error types

* update to latest version 1.15.0 of OTEL

* [HCP Observability] OTELSink (#17159)

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Create new OTELExporter which uses the MetricsClient
Add transform because the conversion is in an /internal package

* Fix lint error

* early return when there are no metrics

* Add NewOTELExporter() function

* Downgrade to metrics SDK version: v1.15.0-rc.1

* Fix imports

* fix small nits with comments and url.URL

* Fix tests by asserting actual error for context cancellation, fix parallel, and make mock more versatile

* Cleanup error handling and clarify empty metrics case

* Fix input/expected naming in otel_transform_test.go

* add comment for metric tracking

* Add a general isEmpty method

* Add clear error types

* update to latest version 1.15.0 of OTEL

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Initialize OTELSink with sync.Map for all the instrument stores.

* Moved PeriodicReader init to NewOtelReader function. This allows us to use a ManualReader for tests.

* Switch to mutex instead of sync.Map to avoid type assertion

* Add gauge store

* Clarify comments

* return concrete sink type

* Fix lint errors

* Move gauge store to be within sink

* Use context.TODO,rebase and clenaup opts handling

* Rebase onto otl exporter to downgrade metrics API to v1.15.0-rc.1

* Fix imports

* Update to latest stable version by rebasing on cc-4933, fix import, remove mutex init, fix opts error messages and use logger from ctx

* Add lots of documentation to the OTELSink

* Fix gauge store comment and check ok

* Add select and ctx.Done() check to gauge callback

* use require.Equal for attributes

* Fixed import naming

* Remove float64 calls and add a NewGaugeStore method

* Change name Store to Set in gaugeStore, add concurrency tests in both OTELSink and gauge store

* Generate 100 gauge operations

* Seperate the labels into goroutines in sink test

* Generate kv store for the test case keys to avoid using uuid

* Added a race test with 300 samples for OTELSink

* Do not pass in waitgroup and use error channel instead.

* Using SHA 7dea2225a218872e86d2f580e82c089b321617b0 to avoid build failures in otel

* Fix nits

* [HCP Observability] Init OTELSink in Telemetry (#17162)

* Move hcp client to subpackage hcpclient (#16800)

* [HCP Observability] New MetricsClient (#17100)

* Client configured with TLS using HCP config and retry/throttle

* Add tests and godoc for metrics client

* close body after request

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* remove clone

* Extract CloudConfig and mock for future PR

* Switch to hclog.FromContext

* [HCP Observability] New MetricsClient (#17100)

* Client configured with TLS using HCP config and retry/throttle

* Add tests and godoc for metrics client

* close body after request

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* remove clone

* Extract CloudConfig and mock for future PR

* Switch to hclog.FromContext

* [HCP Observability] New MetricsClient (#17100)

* Client configured with TLS using HCP config and retry/throttle

* Add tests and godoc for metrics client

* close body after request

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* remove clone

* Extract CloudConfig and mock for future PR

* Switch to hclog.FromContext

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Create new OTELExporter which uses the MetricsClient
Add transform because the conversion is in an /internal package

* Fix lint error

* early return when there are no metrics

* Add NewOTELExporter() function

* Downgrade to metrics SDK version: v1.15.0-rc.1

* Fix imports

* fix small nits with comments and url.URL

* Fix tests by asserting actual error for context cancellation, fix parallel, and make mock more versatile

* Cleanup error handling and clarify empty metrics case

* Fix input/expected naming in otel_transform_test.go

* add comment for metric tracking

* Add a general isEmpty method

* Add clear error types

* update to latest version 1.15.0 of OTEL

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Initialize OTELSink with sync.Map for all the instrument stores.

* Moved PeriodicReader init to NewOtelReader function. This allows us to use a ManualReader for tests.

* Switch to mutex instead of sync.Map to avoid type assertion

* Add gauge store

* Clarify comments

* return concrete sink type

* Fix lint errors

* Move gauge store to be within sink

* Use context.TODO,rebase and clenaup opts handling

* Rebase onto otl exporter to downgrade metrics API to v1.15.0-rc.1

* Fix imports

* Update to latest stable version by rebasing on cc-4933, fix import, remove mutex init, fix opts error messages and use logger from ctx

* Add lots of documentation to the OTELSink

* Fix gauge store comment and check ok

* Add select and ctx.Done() check to gauge callback

* use require.Equal for attributes

* Fixed import naming

* Remove float64 calls and add a NewGaugeStore method

* Change name Store to Set in gaugeStore, add concurrency tests in both OTELSink and gauge store

* Generate 100 gauge operations

* Seperate the labels into goroutines in sink test

* Generate kv store for the test case keys to avoid using uuid

* Added a race test with 300 samples for OTELSink

* [HCP Observability] OTELExporter (#17128)

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Create new OTELExporter which uses the MetricsClient
Add transform because the conversion is in an /internal package

* Fix lint error

* early return when there are no metrics

* Add NewOTELExporter() function

* Downgrade to metrics SDK version: v1.15.0-rc.1

* Fix imports

* fix small nits with comments and url.URL

* Fix tests by asserting actual error for context cancellation, fix parallel, and make mock more versatile

* Cleanup error handling and clarify empty metrics case

* Fix input/expected naming in otel_transform_test.go

* add comment for metric tracking

* Add a general isEmpty method

* Add clear error types

* update to latest version 1.15.0 of OTEL

* Do not pass in waitgroup and use error channel instead.

* Using SHA 7dea2225a218872e86d2f580e82c089b321617b0 to avoid build failures in otel

* Rebase onto otl exporter to downgrade metrics API to v1.15.0-rc.1

* Initialize OTELSink with sync.Map for all the instrument stores.

* Added telemetry agent to client and init sink in deps

* Fixed client

* Initalize sink in deps

* init sink in telemetry library

* Init deps before telemetry

* Use concrete telemetry.OtelSink type

* add /v1/metrics

* Avoid returning err for telemetry init

* move sink init within the IsCloudEnabled()

* Use HCPSinkOpts in deps instead

* update golden test for configuration file

* Switch to using extra sinks in the telemetry library

* keep name MetricsConfig

* fix log in verifyCCMRegistration

* Set logger in context

* pass around MetricSink in deps

* Fix imports

* Rebased onto otel sink pr

* Fix URL in test

* [HCP Observability] OTELSink (#17159)

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Create new OTELExporter which uses the MetricsClient
Add transform because the conversion is in an /internal package

* Fix lint error

* early return when there are no metrics

* Add NewOTELExporter() function

* Downgrade to metrics SDK version: v1.15.0-rc.1

* Fix imports

* fix small nits with comments and url.URL

* Fix tests by asserting actual error for context cancellation, fix parallel, and make mock more versatile

* Cleanup error handling and clarify empty metrics case

* Fix input/expected naming in otel_transform_test.go

* add comment for metric tracking

* Add a general isEmpty method

* Add clear error types

* update to latest version 1.15.0 of OTEL

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Initialize OTELSink with sync.Map for all the instrument stores.

* Moved PeriodicReader init to NewOtelReader function. This allows us to use a ManualReader for tests.

* Switch to mutex instead of sync.Map to avoid type assertion

* Add gauge store

* Clarify comments

* return concrete sink type

* Fix lint errors

* Move gauge store to be within sink

* Use context.TODO,rebase and clenaup opts handling

* Rebase onto otl exporter to downgrade metrics API to v1.15.0-rc.1

* Fix imports

* Update to latest stable version by rebasing on cc-4933, fix import, remove mutex init, fix opts error messages and use logger from ctx

* Add lots of documentation to the OTELSink

* Fix gauge store comment and check ok

* Add select and ctx.Done() check to gauge callback

* use require.Equal for attributes

* Fixed import naming

* Remove float64 calls and add a NewGaugeStore method

* Change name Store to Set in gaugeStore, add concurrency tests in both OTELSink and gauge store

* Generate 100 gauge operations

* Seperate the labels into goroutines in sink test

* Generate kv store for the test case keys to avoid using uuid

* Added a race test with 300 samples for OTELSink

* Do not pass in waitgroup and use error channel instead.

* Using SHA 7dea2225a218872e86d2f580e82c089b321617b0 to avoid build failures in otel

* Fix nits

* pass extraSinks as function param instead

* Add default interval as package export

* remove verifyCCM func

* Add clusterID

* Fix import and add t.Parallel() for missing tests

* Kick Vercel CI

* Remove scheme from endpoint path, and fix error logging

* return metrics.MetricSink for sink method

* Update SDK

* [HCP Observability] Metrics filtering and Labels in Go Metrics sink (#17184)

* Move hcp client to subpackage hcpclient (#16800)

* [HCP Observability] New MetricsClient (#17100)

* Client configured with TLS using HCP config and retry/throttle

* Add tests and godoc for metrics client

* close body after request

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* remove clone

* Extract CloudConfig and mock for future PR

* Switch to hclog.FromContext

* [HCP Observability] New MetricsClient (#17100)

* Client configured with TLS using HCP config and retry/throttle

* Add tests and godoc for metrics client

* close body after request

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* remove clone

* Extract CloudConfig and mock for future PR

* Switch to hclog.FromContext

* [HCP Observability] New MetricsClient (#17100)

* Client configured with TLS using HCP config and retry/throttle

* Add tests and godoc for metrics client

* close body after request

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* remove clone

* Extract CloudConfig and mock for future PR

* Switch to hclog.FromContext

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Create new OTELExporter which uses the MetricsClient
Add transform because the conversion is in an /internal package

* Fix lint error

* early return when there are no metrics

* Add NewOTELExporter() function

* Downgrade to metrics SDK version: v1.15.0-rc.1

* Fix imports

* fix small nits with comments and url.URL

* Fix tests by asserting actual error for context cancellation, fix parallel, and make mock more versatile

* Cleanup error handling and clarify empty metrics case

* Fix input/expected naming in otel_transform_test.go

* add comment for metric tracking

* Add a general isEmpty method

* Add clear error types

* update to latest version 1.15.0 of OTEL

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Initialize OTELSink with sync.Map for all the instrument stores.

* Moved PeriodicReader init to NewOtelReader function. This allows us to use a ManualReader for tests.

* Switch to mutex instead of sync.Map to avoid type assertion

* Add gauge store

* Clarify comments

* return concrete sink type

* Fix lint errors

* Move gauge store to be within sink

* Use context.TODO,rebase and clenaup opts handling

* Rebase onto otl exporter to downgrade metrics API to v1.15.0-rc.1

* Fix imports

* Update to latest stable version by rebasing on cc-4933, fix import, remove mutex init, fix opts error messages and use logger from ctx

* Add lots of documentation to the OTELSink

* Fix gauge store comment and check ok

* Add select and ctx.Done() check to gauge callback

* use require.Equal for attributes

* Fixed import naming

* Remove float64 calls and add a NewGaugeStore method

* Change name Store to Set in gaugeStore, add concurrency tests in both OTELSink and gauge store

* Generate 100 gauge operations

* Seperate the labels into goroutines in sink test

* Generate kv store for the test case keys to avoid using uuid

* Added a race test with 300 samples for OTELSink

* [HCP Observability] OTELExporter (#17128)

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Create new OTELExporter which uses the MetricsClient
Add transform because the conversion is in an /internal package

* Fix lint error

* early return when there are no metrics

* Add NewOTELExporter() function

* Downgrade to metrics SDK version: v1.15.0-rc.1

* Fix imports

* fix small nits with comments and url.URL

* Fix tests by asserting actual error for context cancellation, fix parallel, and make mock more versatile

* Cleanup error handling and clarify empty metrics case

* Fix input/expected naming in otel_transform_test.go

* add comment for metric tracking

* Add a general isEmpty method

* Add clear error types

* update to latest version 1.15.0 of OTEL

* Do not pass in waitgroup and use error channel instead.

* Using SHA 7dea2225a218872e86d2f580e82c089b321617b0 to avoid build failures in otel

* Rebase onto otl exporter to downgrade metrics API to v1.15.0-rc.1

* Initialize OTELSink with sync.Map for all the instrument stores.

* Added telemetry agent to client and init sink in deps

* Fixed client

* Initalize sink in deps

* init sink in telemetry library

* Init deps before telemetry

* Use concrete telemetry.OtelSink type

* add /v1/metrics

* Avoid returning err for telemetry init

* move sink init within the IsCloudEnabled()

* Use HCPSinkOpts in deps instead

* update golden test for configuration file

* Switch to using extra sinks in the telemetry library

* keep name MetricsConfig

* fix log in verifyCCMRegistration

* Set logger in context

* pass around MetricSink in deps

* Fix imports

* Rebased onto otel sink pr

* Fix URL in test

* [HCP Observability] OTELSink (#17159)

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Create new OTELExporter which uses the MetricsClient
Add transform because the conversion is in an /internal package

* Fix lint error

* early return when there are no metrics

* Add NewOTELExporter() function

* Downgrade to metrics SDK version: v1.15.0-rc.1

* Fix imports

* fix small nits with comments and url.URL

* Fix tests by asserting actual error for context cancellation, fix parallel, and make mock more versatile

* Cleanup error handling and clarify empty metrics case

* Fix input/expected naming in otel_transform_test.go

* add comment for metric tracking

* Add a general isEmpty method

* Add clear error types

* update to latest version 1.15.0 of OTEL

* Client configured with TLS using HCP config and retry/throttle

* run go mod tidy

* Remove one abstraction to use the config from deps

* Address PR feedback

* Initialize OTELSink with sync.Map for all the instrument stores.

* Moved PeriodicReader init to NewOtelReader function. This allows us to use a ManualReader for tests.

* Switch to mutex instead of sync.Map to avoid type assertion

* Add gauge store

* Clarify comments

* return concrete sink type

* Fix lint errors

* Move gauge store to be within sink

* Use context.TODO,rebase and clenaup opts handling

* Rebase onto otl exporter to downgrade metrics API to v1.15.0-rc.1

* Fix imports

* Update to latest stable version by rebasing on cc-4933, fix import, remove mutex init, fix opts error messages and use logger from ctx

* Add lots of documentation to the OTELSink

* Fix gauge store comment and check ok

* Add select and ctx.Done() check to gauge callback

* use require.Equal for attributes

* Fixed import naming

* Remove float64 calls and add a NewGaugeStore method

* Change name Store to Set in gaugeStore, add concurrency tests in both OTELSink and gauge store

* Generate 100 gauge operations

* Seperate the labels into goroutines in sink test

* Generate kv store for the test case keys to avoid using uuid

* Added a race test with 300 samples for OTELSink

* Do not pass in waitgroup and use error channel instead.

* Using SHA 7dea2225a218872e86d2f580e82c089b321617b0 to avoid build failures in otel

* Fix nits

* pass extraSinks as function param instead

* Add default interval as package export

* remove verifyCCM func

* Add clusterID

* Fix import and add t.Parallel() for missing tests

* Kick Vercel CI

* Remove scheme from endpoint path, and fix error logging

* return metrics.MetricSink for sink method

* Update SDK

* Added telemetry agent to client and init sink in deps

* Add node_id and __replica__ default labels

* add function for default labels and set x-hcp-resource-id

* Fix labels tests

* Commit suggestion for getDefaultLabels



* Fixed server.id, and t.Parallel()

* Make defaultLabels a method on the TelemetryConfig object

* Rename FilterList to lowercase filterList

* Cleanup filter implemetation by combining regex into a single one, and making the type lowercase

* Fix append

* use regex directly for filters

* Fix x-resource-id test to use mocked value

* Fix log.Error formats

* Forgot the len(opts.Label) optimization)

* Use cfg.NodeID instead

---------



* remove replic tag (#17484)

* [HCP Observability] Add custom metrics for OTEL sink, improve logging, upgrade modules and cleanup metrics client (#17455)

* Add custom metrics for Exporter and transform operations

* Improve deps logging

Run go mod tidy

* Upgrade SDK and OTEL

* Remove the partial success implemetation and check for HTTP status code in metrics client

* Add x-channel

* cleanup logs in deps.go based on PR feedback

* Change to debug log and lowercase

* address test operation feedback

* use GetHumanVersion on version

* Fix error wrapping

* Fix metric names

* [HCP Observability] Turn off retries for now until dynamically configurable (#17496)

* Remove retries for now until dynamic configuration is possible

* Clarify comment

* Update changelog

* improve changelog

---------

Co-authored-by: Joshua Timmons <joshua.timmons1@gmail.com>
2023-05-29 17:02:52 -04:00
hc-github-team-consul-core d60e96f590
Backport of perf: Remove expensive reflection from raft/mesh hot path into release/1.15.x (#17493)
* backport of commit 04b6a90934

* backport of commit 13e40572bd

---------

Co-authored-by: Lincoln Stoll <me@lds.li>
Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-05-26 18:04:50 +00:00
hc-github-team-consul-core b41a4e7e0f
backport of commit bf0a29e030 (#17490)
Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-05-26 16:59:02 +00:00
hc-github-team-consul-core 676c51cc08
backport of commit cfd06f4b28 (#17480)
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
2023-05-25 21:25:11 +00:00
hc-github-team-consul-core aa73c4f72c
backport of commit ee51fc87b4 (#17472)
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
2023-05-25 09:30:57 -07:00
hc-github-team-consul-core 2d8b8321f8
backport of commit b35371ac27 (#17465)
Co-authored-by: DanStough <dan.stough@hashicorp.com>
2023-05-25 15:59:20 +00:00
Michael Zalimeni 66f7d7b207
Manual backport 1.15.x of Disable remote proxy patching except AWS Lambda (#17432)
backport of commit ba18381ab2
2023-05-24 22:30:25 -04:00
hc-github-team-consul-core c5b6a0811c
backport of commit ac9cd49a09 (#17447)
Co-authored-by: cskh <hui.kang@hashicorp.com>
2023-05-24 21:04:36 -04:00
hc-github-team-consul-core 6c7c0cf66d
Backport of Fix namespaced peer service updates / deletes. into release/1.15.x (#17458)
* backport of commit dc995c18fd

* backport of commit 169a3279b6

---------

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-05-24 21:55:16 +00:00
hc-github-team-consul-core 58806aa0a8
backport of commit a6322d8c94 (#17444)
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
2023-05-24 16:05:01 +00:00
hc-github-team-consul-core a5960414a1
Backport of [OSS] gRPC Blocking Queries into release/1.15.x (#17441)
* backport of feat: initial grpc blocking queries (11b1dd2)

* backport of changelog and docs update (5ceef20)

---------

Co-authored-by: DanStough <dan.stough@hashicorp.com>
2023-05-24 11:35:45 -04:00
cskh 5526290892
[Release/1.15.x] net 3914 gha consul container test no splitting (#17425) 2023-05-23 14:06:48 -04:00
hc-github-team-consul-core 1cc9457e29
Backport of Only synthesize anonymous token in primary DC into release/1.15.x (#17431)
* backport of commit 1e48592aaa

* Add integration test for wan fed issue

* Add changelog

---------

Co-authored-by: Paul Glass <pglass@hashicorp.com>
2023-05-23 15:30:09 +00:00
John Murret 10d12cf3df
ci:upload test results to datadog (#17206) (#17302)
* WIP

* ci:upload test results to datadog

* fix use of envvar in expression

* getting correct permission in reusable-unit.yml

* getting correct permission in reusable-unit.yml

* fixing DATADOG_API_KEY envvar expresssion

* pass datadog-api-key

* removing type from datadog-api-key
2023-05-23 03:29:21 -07:00
R.B. Boyer 16334439b0
[1.15.x] prototest: fix early return condition in AssertElementsMatch (#17417)
manual backport of #17416 to 1.15.x
2023-05-22 13:49:55 -05:00
hc-github-team-consul-core e2d9d3992f
Backport of docs: Reference pages for service-router and service-resolver config entries into release/1.15.x (#17397)
* no-op commit due to failed cherry-picking

* docs: Reference pages for service-router and service-resolver config entries (#17145)

* service-resolve configuration entry reference

* Updates

* missing backtick

* service router configuration entry reference

* link fixes + tab fixes

* link and tab fixes

* link fixes

* service resolver improvements

* hierarchy fixes

* spacing

* links + formatting

* proofing fixes

* mmore fixes

* Apply suggestions from code review

suggestions from code review for service resolver

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* policy sections edits

* service router code review

* Tables to sections - service router HCL

* YAML tables to sections

* formatting fixes

* converting tables to sections - service resolver

* final tables to sections

* Adjustments/alignments

* nanosecond fix

* Update website/content/docs/connect/config-entries/service-router.mdx

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* link to filter example config

---------

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* Update website/content/docs/connect/config-entries/service-resolver.mdx

* merge fix

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
Co-authored-by: boruszak <jeffrey.boruszak@hashicorp.com>
2023-05-19 11:23:45 -07:00
Ashvitha 87d3f45ab5
Rename hcp-metrics-collector to consul-telemetry-collector (#17327) (#17412)
* Rename hcp-metrics-collector to consul-telemetry-collector

* Fix docs

* Fix doc comment

---------

Co-authored-by: Connor <connor.kelly@hashicorp.com>
2023-05-19 11:33:36 -04:00
hc-github-team-consul-core b345f184c2
backport of commit 5a29f9b4f7 (#17408)
Co-authored-by: trujillo-adam <ajosetru@gmail.com>
2023-05-18 17:15:21 +00:00
Jeff Boruszak ee06276cd4
docs: Fix merge conflicts (#17405)
* no-op commit due to failed cherry-picking

* docs: connect-service-upstreams annotation fixes (#17312)

* corrections

* fixes

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Switching order of labeled/unlabeled

---------

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* Fix merge conflict

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
2023-05-18 10:06:50 -07:00
hc-github-team-consul-core e01469b68d
Backport of docs: connect-service-upstreams annotation fixes into release/1.15.x (#17338)
* no-op commit due to failed cherry-picking

* docs: connect-service-upstreams annotation fixes (#17312)

* corrections

* fixes

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Switching order of labeled/unlabeled

---------

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
2023-05-17 15:12:59 -07:00
hc-github-team-consul-core ccf3af708d
Backport of Docs/igw docs day refactor into release/1.15.x (#17396)
* backport of commit 0afff9e337

* backport of commit fe56513759

* backport of commit 49a4951d89

* backport of commit 1995a5f37d

* backport of commit 1f39bdf3f4

* backport of commit 5a2e89f281

---------

Co-authored-by: trujillo-adam <ajosetru@gmail.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
2023-05-17 14:00:57 -07:00
hc-github-team-consul-core 7dccf73d21
backport of commit ccf91c7b7f (#17384)
Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-05-16 10:17:02 +00:00
hc-github-team-consul-core 0beb371485
manual backport of docs/krastin/retitle (#17350)
Co-authored-by: Krastin Krastev <krastin@hashicorp.com>
2023-05-16 12:28:19 +03:00