From db786ae1d55e781a0054659848643e988dc25f30 Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Wed, 12 Aug 2020 08:44:54 -0500 Subject: [PATCH] Removed server url from elastic health check --- .../HealthChecks/ElasticsearchHealthCheck.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Exceptionless.Insulation/HealthChecks/ElasticsearchHealthCheck.cs b/src/Exceptionless.Insulation/HealthChecks/ElasticsearchHealthCheck.cs index 8801f6617a..025b07526b 100644 --- a/src/Exceptionless.Insulation/HealthChecks/ElasticsearchHealthCheck.cs +++ b/src/Exceptionless.Insulation/HealthChecks/ElasticsearchHealthCheck.cs @@ -23,9 +23,9 @@ public async Task CheckHealthAsync(HealthCheckContext context try { var response = await _config.Client.PingAsync(ct: cancellationToken).AnyContext(); if (!response.IsValid) - return HealthCheckResult.Unhealthy($"Elasticsearch Ping Failed: {_config.Options.ServerUrl} - {response.OriginalException?.Message}", response.OriginalException); + return HealthCheckResult.Unhealthy("Elasticsearch Ping Failed", response.OriginalException); } catch (Exception ex) { - return HealthCheckResult.Unhealthy($"Elasticsearch Not Working: {_config.Options.ServerUrl} - {ex.Message}", ex); + return HealthCheckResult.Unhealthy("Elasticsearch Not Working", ex); } finally { sw.Stop(); _logger.LogTrace("Checking Elasticsearch took {Duration:g}", sw.Elapsed);