mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
feat: also report database connection count by cluster in scheduled tasks worker
This commit is contained in:
parent
d097436f3e
commit
81cc1465cd
1 changed files with 7 additions and 0 deletions
|
|
@ -94,6 +94,13 @@ public class TaskHandler
|
||||||
// this is pretty much always inaccurate but oh well
|
// this is pretty much always inaccurate but oh well
|
||||||
_metrics.Measure.Gauge.SetValue(CoreMetrics.DatabaseConnections, stats.Sum(x => x.DatabaseConnectionCount));
|
_metrics.Measure.Gauge.SetValue(CoreMetrics.DatabaseConnections, stats.Sum(x => x.DatabaseConnectionCount));
|
||||||
|
|
||||||
|
foreach (var stat in redisStats)
|
||||||
|
_metrics.Measure.Gauge.SetValue(
|
||||||
|
CoreMetrics.DatabaseConnectionsByCluster,
|
||||||
|
new MetricTags("cluster_id", stat.Name),
|
||||||
|
JsonConvert.DeserializeObject<ClusterMetricInfo>(stat.Value).DatabaseConnectionCount
|
||||||
|
);
|
||||||
|
|
||||||
// Other shiz
|
// Other shiz
|
||||||
_metrics.Measure.Gauge.SetValue(Metrics.WebhookCacheSize, stats.Sum(x => x.WebhookCacheSize));
|
_metrics.Measure.Gauge.SetValue(Metrics.WebhookCacheSize, stats.Sum(x => x.WebhookCacheSize));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue