-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[n8n] Fix metric mappings and add full v2 metric coverage #23635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
AAraKKe
wants to merge
7
commits into
master
Choose a base branch
from
aarakke/fix-n8n-metrics
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7f24059
Fix n8n metric mappings and add full v2 metric coverage
AAraKKe 2991295
Add changelog for PR #23635
AAraKKe 12f3122
Refine n8n metric coverage and e2e setup
AAraKKe 8523188
Document raw_metric_prefix requirement when customizing N8N_METRICS_P…
AAraKKe 1be3b3d
Reformat changelog so towncrier renders sub-bullets correctly
AAraKKe af60d11
Add tests/lab traffic generator for n8n
AAraKKe 43e7fc8
Add missing n8n event metric mappings
AAraKKe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Update the n8n metric coverage and test harness, verified live against n8n 1.118.1 and 2.19.5: | ||
|
|
||
| - Add missing common event-driven metrics: ``audit.workflow.archived``, ``audit.workflow.created``, ``audit.workflow.deleted``, ``audit.workflow.unarchived``, ``audit.workflow.updated``, and ``queue.job.stalled``. | ||
| - Add n8n 2.x workflow duration metrics: ``workflow.execution.duration.seconds.*``. | ||
| - Add n8n 2.x audit workflow metrics: ``audit.workflow.activated``, ``audit.workflow.deactivated``, ``audit.workflow.executed``, ``audit.workflow.resumed``, ``audit.workflow.version.updated``, and ``audit.workflow.waiting``. | ||
| - Add n8n 2.x embed login metrics: ``embed.login.requests`` and ``embed.login.failures``. | ||
| - Add n8n 2.x token exchange metrics: ``token.exchange.requests``, ``token.exchange.failures``, ``token.exchange.identity.linked``, and ``token.exchange.jit.provisioning``. | ||
| - Add n8n 2.x process memory metric: ``process.pss.bytes``. | ||
| - Add n8n 2.x workflow statistics metrics: ``production.executions``, ``production.root.executions``, ``manual.executions``, ``users.total``, ``enabled.users``, ``workflows.total``, and ``credentials.total``. | ||
| - Restore valid metrics that the integration was previously dropping: ``queue.job.dequeued``, ``nodejs.active.requests``. | ||
| - Add worker-only families ``node.started``, ``node.finished``, ``queue.job.dequeued``, and ``runner.task.requested`` and document scraping the n8n worker process as a separate Datadog instance. | ||
| - Remove the gating of OpenMetrics scraping on ``/healthz/readiness`` - ``n8n.readiness.check`` is still submitted, but metrics keep flowing when readiness reports degraded so SRE-relevant signals (queue depth, process state) are not lost during incidents. | ||
| - Document version-specific metric availability and the n8n env flags that gate them (``N8N_METRICS_INCLUDE_WORKFLOW_STATISTICS``, ``N8N_METRICS_INCLUDE_WORKFLOW_EXECUTION_DURATION``, ``N8N_METRICS_INCLUDE_QUEUE_METRICS``). | ||
| - Use the actual ``/metrics`` URL in the ``openmetrics_endpoint`` example in ``conf.yaml.example``/``spec.yaml`` (was previously the host root, which silently mismatched the scrape path the check uses). | ||
| - Document that ``raw_metric_prefix`` in ``conf.yaml`` must be kept in sync with a customised ``N8N_METRICS_PREFIX`` for the check to recognise the exposed metric names. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In n8n 2.x queue mode, a stalled job event is emitted as
n8n.queue.job.stalled, which the Prometheus service exposes asn8n_queue_job_stalled_total; with this map limited to completed/dequeued/enqueued/failed, that counter is silently ignored even when message event bus metrics are enabled. Since this block adds queue-job coverage, includequeue_job_stalled(and corresponding metadata) so stalled jobs are collected.Useful? React with 👍 / 👎.