Added some logging for country
This commit is contained in:
@@ -166,6 +166,10 @@ public class GeoIPService : IHostedService
|
|||||||
|
|
||||||
if (_dbReader!.TryCity(ip, out var response))
|
if (_dbReader!.TryCity(ip, out var response))
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation(ip.ToString());
|
||||||
|
_logger.LogInformation(response?.Country?.ToString());
|
||||||
|
_logger.LogInformation(response?.Country?.IsoCode);
|
||||||
|
|
||||||
var country = response?.Country?.IsoCode;
|
var country = response?.Country?.IsoCode;
|
||||||
return !string.IsNullOrEmpty(country) ? country : "*";
|
return !string.IsNullOrEmpty(country) ? country : "*";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,8 +190,13 @@ public partial class LightlessHub : Hub<ILightlessHub>, ILightlessHub
|
|||||||
if (_userConnections.TryGetValue(UserUID, out var connectionId)
|
if (_userConnections.TryGetValue(UserUID, out var connectionId)
|
||||||
&& string.Equals(connectionId, Context.ConnectionId, StringComparison.Ordinal))
|
&& string.Equals(connectionId, Context.ConnectionId, StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
_lightlessMetrics.DecGaugeWithLabels(MetricsAPI.GaugeConnections, labels: Continent);
|
var ResultLabels = new List<string>
|
||||||
_lightlessMetrics.DecGaugeWithLabels(MetricsAPI.GaugeConnections, labels: Country);
|
{
|
||||||
|
Continent,
|
||||||
|
Country,
|
||||||
|
};
|
||||||
|
_lightlessMetrics.DecGaugeWithLabels(MetricsAPI.GaugeConnections, labels: [.. ResultLabels]);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await GposeLobbyLeave().ConfigureAwait(false);
|
await GposeLobbyLeave().ConfigureAwait(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user