feat(core): Add workflow name label to workflow metrics (#16837)

Co-authored-by: Marc Littlemore <marc@n8n.io>
This commit is contained in:
Israel Shenkar
2025-07-08 11:11:03 +03:00
committed by GitHub
parent 4ca9826d7e
commit 0cc54ecf6d
7 changed files with 393 additions and 52 deletions

View File

@@ -61,6 +61,10 @@ class PrometheusMetricsConfig {
/** How often (in seconds) to update active workflow metric */
@Env('N8N_METRICS_ACTIVE_WORKFLOW_METRIC_INTERVAL')
activeWorkflowCountInterval: number = 60;
/** Whether to include a label for workflow name on workflow metrics. */
@Env('N8N_METRICS_INCLUDE_WORKFLOW_NAME_LABEL')
includeWorkflowNameLabel: boolean = false;
}
@Config

View File

@@ -176,6 +176,7 @@ describe('GlobalConfig', () => {
enable: false,
prefix: 'n8n_',
includeWorkflowIdLabel: false,
includeWorkflowNameLabel: false,
includeDefaultMetrics: true,
includeMessageEventBusMetrics: false,
includeNodeTypeLabel: false,