Skip to content

Commit

Permalink
Removed server url from elastic health check
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Aug 12, 2020
1 parent 77d9add commit db786ae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public async Task<HealthCheckResult> 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);
Expand Down

0 comments on commit db786ae

Please sign in to comment.