mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Log gateway latency to console
This commit is contained in:
parent
aa04d2055e
commit
c68ce1bdd3
1 changed files with 5 additions and 2 deletions
|
|
@ -105,8 +105,8 @@ namespace PluralKit.Bot
|
|||
.AddTransient<ProxyService>()
|
||||
.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…
Add table
Add a link
Reference in a new issue