Log gateway latency to console
This commit is contained in:
parent
aa04d2055e
commit
c68ce1bdd3
@ -106,7 +106,7 @@ namespace PluralKit.Bot
|
||||
.AddTransient<LogChannelService>()
|
||||
.AddTransient<DataFileService>()
|
||||
|
||||
.AddSingleton<ProxyCacheService>()
|
||||
.AddTransient<ProxyCacheService>()
|
||||
.AddSingleton<WebhookCacheService>()
|
||||
|
||||
.AddTransient<SystemStore>()
|
||||
@ -368,6 +368,9 @@ namespace PluralKit.Bot
|
||||
private void RegisterMessageMetrics(SocketMessage msg)
|
||||
{
|
||||
_metrics.Measure.Meter.Mark(BotMetrics.MessagesReceived);
|
||||
|
||||
var gatewayLatency = DateTimeOffset.Now - msg.CreatedAt;
|
||||
_logger.Debug("Message received with latency {Latency}", gatewayLatency);
|
||||
}
|
||||
|
||||
public Task HandleReactionAdded(Cacheable<IUserMessage, ulong> message, ISocketMessageChannel channel,
|
||||
|
Loading…
Reference in New Issue
Block a user