From 36cd06b952e12d7fc6cc79501c50314b27102b2d Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Mon, 30 Nov 2020 09:05:38 +0000 Subject: [PATCH] Add Debug logging and dont set type for ex as we are not using it --- src/Umbraco.Web/Telemetry/ReportSiteTask.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/Telemetry/ReportSiteTask.cs b/src/Umbraco.Web/Telemetry/ReportSiteTask.cs index 074322e126..373a1765c8 100644 --- a/src/Umbraco.Web/Telemetry/ReportSiteTask.cs +++ b/src/Umbraco.Web/Telemetry/ReportSiteTask.cs @@ -92,16 +92,19 @@ namespace Umbraco.Web.Telemetry var request = new HttpRequestMessage(HttpMethod.Post, "installs/"); request.Content = new StringContent(JsonConvert.SerializeObject(postData), Encoding.UTF8, "application/json"); //CONTENT-TYPE header + // Make a HTTP Post to telemetry service // https://telemetry.umbraco.com/installs/ // Fire & Forget, do not need to know if its a 200, 500 etc var result = await _httpClient.SendAsync(request); } - catch (Exception ex) + catch { // Silently swallow - // The user does need logs being polluted if our service has fallen over or is down etc + // The user does not need the logs being polluted if our service has fallen over or is down etc + // Hence only loggigng this at a more verbose level (Which users should not be using in prod) + _logger.Debug("There was a problem sending a request to the Umbraco telemetry service"); } // Keep recurring this task & pinging the telemetry service