feat: also report database connection count by cluster in scheduled tasks worker
This commit is contained in:
parent
d097436f3e
commit
81cc1465cd
@ -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…
Reference in New Issue
Block a user