feat(core): Add metric for active workflow count (#13420)

This commit is contained in:
Juuso Tapaninen
2025-02-26 14:16:38 +02:00
committed by GitHub
parent f7f5f5e95c
commit 3aa679e4ac
7 changed files with 226 additions and 3 deletions

View File

@@ -57,6 +57,10 @@ class PrometheusMetricsConfig {
/** How often (in seconds) to update queue metrics. */
@Env('N8N_METRICS_QUEUE_METRICS_INTERVAL')
queueMetricsInterval: number = 20;
/** How often (in seconds) to update active workflow metric */
@Env('N8N_METRICS_ACTIVE_WORKFLOW_METRIC_INTERVAL')
activeWorkflowCountInterval: number = 60;
}
@Config

View File

@@ -173,6 +173,7 @@ describe('GlobalConfig', () => {
includeApiStatusCodeLabel: false,
includeQueueMetrics: false,
queueMetricsInterval: 20,
activeWorkflowCountInterval: 60,
},
additionalNonUIRoutes: '',
disableProductionWebhooksOnMainProcess: false,