mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-05 13:27:54 +00:00
Revert "refactor: run InfluxDB reporter through AppMetrics instead of per-minute task"
This reverts commit 38a3683fca.
This commit is contained in:
parent
38a3683fca
commit
0bad2e8ff9
3 changed files with 4 additions and 1 deletions
|
|
@ -238,5 +238,7 @@ public class Bot
|
|||
|
||||
// Collect some stats, submit them to the metrics backend
|
||||
await _collector.CollectStats();
|
||||
await Task.WhenAll(((IMetricsRoot)_metrics).ReportRunner.RunAllAsync());
|
||||
_logger.Debug("Submitted metrics to backend");
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ public class MetricsModule: Module
|
|||
{
|
||||
var builder = AppMetrics.CreateDefaultBuilder();
|
||||
if (config.InfluxUrl != null && config.InfluxDb != null)
|
||||
builder.Report.ToInfluxDb(config.InfluxUrl, config.InfluxDb, TimeSpan.FromMinutes(1));
|
||||
builder.Report.ToInfluxDb(config.InfluxUrl, config.InfluxDb);
|
||||
if (_onlyContext != null)
|
||||
builder.Filter.ByIncludingOnlyContext(_onlyContext);
|
||||
return builder.Build();
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ public class TaskHandler
|
|||
// Other shiz
|
||||
_metrics.Measure.Gauge.SetValue(Metrics.WebhookCacheSize, stats.Sum(x => x.WebhookCacheSize));
|
||||
|
||||
await Task.WhenAll(((IMetricsRoot)_metrics).ReportRunner.RunAllAsync());
|
||||
_logger.Debug("Submitted metrics to backend");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue