From 6ac3c5356e46d44086662d483a270b0b0210ffe4 Mon Sep 17 00:00:00 2001 From: Ashvitha Sridharan Date: Fri, 26 May 2023 15:03:29 -0400 Subject: [PATCH 1/2] Remove retries for now until dynamic configuration is possible --- agent/hcp/client/metrics_client.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/hcp/client/metrics_client.go b/agent/hcp/client/metrics_client.go index a45d6343fc4..6c2510cc138 100644 --- a/agent/hcp/client/metrics_client.go +++ b/agent/hcp/client/metrics_client.go @@ -24,10 +24,12 @@ const ( defaultStreamTimeout = 15 * time.Second // Retry config - // TODO: Evenutally, we'd like to configure these values dynamically. + // TODO: Eventually, we'd like to configure these values dynamically. defaultRetryWaitMin = 1 * time.Second defaultRetryWaitMax = 15 * time.Second - defaultRetryMax = 4 + // defaultRetryMax is set to 0 to turn off retry functionality, until dynamic configuration is possible. + // This reduces load on the Telemetry Gateway for now. + defaultRetryMax = 0 ) // MetricsClient exports Consul metrics in OTLP format to the HCP Telemetry Gateway. From a84594fd053f8601e67ec789f1f7366aea83e764 Mon Sep 17 00:00:00 2001 From: Ashvitha Sridharan Date: Fri, 26 May 2023 17:14:56 -0400 Subject: [PATCH 2/2] Clarify comment --- agent/hcp/client/metrics_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/hcp/client/metrics_client.go b/agent/hcp/client/metrics_client.go index 6c2510cc138..0bab61a510c 100644 --- a/agent/hcp/client/metrics_client.go +++ b/agent/hcp/client/metrics_client.go @@ -28,7 +28,7 @@ const ( defaultRetryWaitMin = 1 * time.Second defaultRetryWaitMax = 15 * time.Second // defaultRetryMax is set to 0 to turn off retry functionality, until dynamic configuration is possible. - // This reduces load on the Telemetry Gateway for now. + // This is to circumvent any spikes in load that may cause or exacerbate server-side issues for now. defaultRetryMax = 0 )