Collect statistics about shard status

This commit is contained in:
Ske
2019-08-12 00:35:30 +02:00
parent b593c32950
commit 90c6869b00
2 changed files with 2 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ namespace PluralKit.Bot
// Aggregate guild/channel stats
_metrics.Measure.Gauge.SetValue(BotMetrics.Guilds, _client.Guilds.Count);
_metrics.Measure.Gauge.SetValue(BotMetrics.Channels, _client.Guilds.Sum(g => g.TextChannels.Count));
_metrics.Measure.Gauge.SetValue(BotMetrics.ShardsConnected, _client.Shards.Count(shard => shard.ConnectionState == ConnectionState.Connected));
// Aggregate member stats
var usersKnown = new HashSet<ulong>();