feat(site-runtime): periodic scheduler-stats reporter feeding site health (S2/UA5)
This commit is contained in:
@@ -70,6 +70,15 @@ public static class ServiceCollectionExtensions
|
||||
c.Timeout = TimeSpan.FromSeconds(
|
||||
sp.GetRequiredService<IOptions<SiteRuntimeOptions>>().Value.ConfigFetchTimeoutSeconds));
|
||||
|
||||
// S2/UA5: periodically lift the shared script-execution scheduler gauges
|
||||
// (queue depth, busy threads, oldest-busy age) onto the site health report.
|
||||
// Registered via factory-lambda so ISiteHealthCollector (registered by the
|
||||
// Host's AddSiteHealthMonitoring) is resolved lazily at host start.
|
||||
services.AddHostedService(sp => new ScriptSchedulerStatsReporter(
|
||||
sp.GetRequiredService<HealthMonitoring.ISiteHealthCollector>(),
|
||||
sp.GetRequiredService<IOptions<SiteRuntimeOptions>>().Value,
|
||||
sp.GetRequiredService<ILogger<ScriptSchedulerStatsReporter>>()));
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user