Add more logs, 95%ram alert for GmxMarkets, Proxy retry 2times max

This commit is contained in:
2025-10-11 13:43:32 +07:00
parent b6a4c7661f
commit e917edd939
3 changed files with 16 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
using System.Net.Http.Json;
using System.Numerics;
using System.Text.Json;
using Managing.Application.Abstractions.Repositories;
using Managing.Application.Abstractions.Services;
using Managing.Common;
@@ -424,6 +425,7 @@ public class EvmManager : IEvmManager
{
Console.WriteLine(
$"Warning: GMX API returned empty candles array for ticker {ticker}, timeframe {timeframe}, startDate {startDate:yyyy-MM-dd HH:mm:ss}");
return new List<Candle>();
}
@@ -433,6 +435,8 @@ public class EvmManager : IEvmManager
{
Console.WriteLine(
$"Warning: No candles found after filtering for ticker {ticker}, timeframe {timeframe}, startDate {startDate:yyyy-MM-dd HH:mm:ss}. Total candles before filtering: {gmxPrices.Candles.Count}");
Console.WriteLine(JsonSerializer.Serialize(filteredCandles));
SentrySdk.CaptureException(new Exception($"No candles found after filtering for ticker {ticker}, timeframe {timeframe}, startDate {startDate:yyyy-MM-dd HH:mm:ss}. Total candles before filtering: {gmxPrices.Candles.Count}"));
return new List<Candle>();
}
@@ -548,6 +552,7 @@ public class EvmManager : IEvmManager
}
catch (Exception ex)
{
SentrySdk.CaptureException(ex);
return false;
}
}
@@ -735,7 +740,7 @@ public class EvmManager : IEvmManager
}
catch (Exception e)
{
Console.WriteLine(e);
SentrySdk.CaptureException(e);
throw;
}
}
@@ -751,6 +756,7 @@ public class EvmManager : IEvmManager
}
catch (Exception ex)
{
SentrySdk.CaptureException(ex);
throw;
}
@@ -777,6 +783,7 @@ public class EvmManager : IEvmManager
}
catch (Exception ex)
{
SentrySdk.CaptureException(ex);
throw;
}
@@ -874,6 +881,7 @@ public class EvmManager : IEvmManager
}
catch (Exception ex)
{
SentrySdk.CaptureException(ex);
Console.Error.WriteLine($"Error getting estimated gas fee: {ex.Message}");
return 0;
}