From 0ff3ddde1c8c0aed3b0a3c1aaf4c59e7ddc3837c Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 19 Apr 2023 12:33:01 -0500 Subject: [PATCH] feat: Move TLS config logging closer to connect. (#1562) --- .../NewRelic/Agent/Core/DataTransport/ConnectionHandler.cs | 6 ++++++ .../NewRelic/Agent/Core/NewRelic.Agent.Core/AgentManager.cs | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Agent/NewRelic/Agent/Core/DataTransport/ConnectionHandler.cs b/src/Agent/NewRelic/Agent/Core/DataTransport/ConnectionHandler.cs index 06f0a22c09..e98780a914 100644 --- a/src/Agent/NewRelic/Agent/Core/DataTransport/ConnectionHandler.cs +++ b/src/Agent/NewRelic/Agent/Core/DataTransport/ConnectionHandler.cs @@ -74,6 +74,7 @@ public void Connect() try { ValidateNotBothHsmAndSecurityPolicies(_configuration); + LogTlsConfiguration(); var preconnectResult = SendPreconnectRequest(); _connectionInfo = new ConnectionInfo(_configuration, preconnectResult.RedirectHost); @@ -112,6 +113,11 @@ public void Connect() } } + private void LogTlsConfiguration() + { + Log.Info($"Current TLS Configuration (System.Net.ServicePointManager.SecurityProtocol): {System.Net.ServicePointManager.SecurityProtocol}"); + } + private void GenerateSpanEventsHarvestLimitMetrics(SingleEventHarvestConfig spanEventHarvestConfig) { if (spanEventHarvestConfig != null) diff --git a/src/Agent/NewRelic/Agent/Core/NewRelic.Agent.Core/AgentManager.cs b/src/Agent/NewRelic/Agent/Core/NewRelic.Agent.Core/AgentManager.cs index 1140d0d1fc..4fe55906e0 100644 --- a/src/Agent/NewRelic/Agent/Core/NewRelic.Agent.Core/AgentManager.cs +++ b/src/Agent/NewRelic/Agent/Core/NewRelic.Agent.Core/AgentManager.cs @@ -184,12 +184,6 @@ private void Initialize() StartServices(); LogInitialized(); - LogTlsConfiguration(); - } - - private void LogTlsConfiguration() - { - Log.Info($"TLS Configuration (System.Net.ServicePointManager.SecurityProtocol): {System.Net.ServicePointManager.SecurityProtocol}"); } private void LogInitialized()