feat(core): Expose queue metrics for Prometheus (#10559)
This commit is contained in:
@@ -49,6 +49,14 @@ class PrometheusMetricsConfig {
|
||||
/** Whether to include metrics derived from n8n's internal events */
|
||||
@Env('N8N_METRICS_INCLUDE_MESSAGE_EVENT_BUS_METRICS')
|
||||
includeMessageEventBusMetrics: boolean = false;
|
||||
|
||||
/** Whether to include metrics for jobs in scaling mode. Not supported in multi-main setup. */
|
||||
@Env('N8N_METRICS_INCLUDE_QUEUE_METRICS')
|
||||
includeQueueMetrics: boolean = false;
|
||||
|
||||
/** How often (in seconds) to update queue metrics. */
|
||||
@Env('N8N_METRICS_QUEUE_METRICS_INTERVAL')
|
||||
queueMetricsInterval: number = 20;
|
||||
}
|
||||
|
||||
@Config
|
||||
|
||||
@@ -165,6 +165,8 @@ describe('GlobalConfig', () => {
|
||||
includeApiMethodLabel: false,
|
||||
includeCredentialTypeLabel: false,
|
||||
includeApiStatusCodeLabel: false,
|
||||
includeQueueMetrics: false,
|
||||
queueMetricsInterval: 20,
|
||||
},
|
||||
additionalNonUIRoutes: '',
|
||||
disableProductionWebhooksOnMainProcess: false,
|
||||
|
||||
Reference in New Issue
Block a user