Skip to content

feat(n8n): add workflow and node execution tracing - #280

Merged
nik13 merged 6 commits into
future-agi:devfrom
jabrailkhalil:feat/n8n-workflow-tracing
Nov 9, 2026
Merged

nik13 merged 6 commits into
future-agi:devfrom
jabrailkhalil:feat/n8n-workflow-tracing

Conversation

@jabrailkhalil

@jabrailkhalil jabrailkhalil commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

I add @traceai/n8n for self-hosted n8n-core >=2.16.1 <3: a workflow span per engine run and child spans for node execution attempts. I preserve the returned PCancelable and cover resolved errors, retries and cancellation. I support automatic CommonJS loading and explicit instrumentation of an already-loaded engine.

Why?

Refs #97. I keep this slice to execution metadata, timing and status. I exclude workflow items, node parameters, credentials and exception messages/stacks. Existing LLM instrumentors can create children under the active node span.

I integrated current dev (547879ce) in 8b71d74b. I registered the package/runtime version with release-please and included it in the workspace build. The lockfile conflict resolution preserves both upstream's new coverage dependency and the n8n dependencies; all existing upstream lock entries are unchanged. The n8n implementation and tests are identical to 8f3f81dc.

How was it tested?

Current-source Linux validation checks out 8b71d74b7876108e14862cbc3b1fc07de756bf5d:

  • All 15 real-engine tests pass against [email protected] / [email protected]: output preservation, context, resolved failures, error continuation, retries, cancellation, concurrent runs, suppression, disable/restore and fresh-process automatic loading. I use local nodes and an in-memory exporter; I do not mock n8n modules.
  • Frozen installation, dependency/package builds, typecheck, formatting and packing pass on Node 22.21.1.
  • I install the three packed packages outside the workspace and verify CommonJS and ESM imports without the n8n engine installed.
  • All 69 release-tooling tests pass; the read-only inventory validates versions and coverage for all 133 packages.

Notes for reviewers

I document the self-hosted setup and compatibility limits. This is engine-process tracing; I have not implemented queue context propagation, persisted context across waiting/resumed runs, n8n Cloud setup or payload capture. Automatic hooks cover CommonJS loading of n8n; native ESM loading of the engine is not covered. I have not published the package to npm or repeated these updated checks on Windows. Upstream review and CI authorization remain required.

@jabrailkhalil
jabrailkhalil changed the base branch from main to dev November 4, 2026 18:17
@nik13
nik13 merged commit 414f7db into future-agi:dev Nov 9, 2026
2 checks passed
nik13 added a commit that referenced this pull request Nov 9, 2026
…red workspace build

#280 added @traceai/n8n to build:consumers, but the train kept dev's reformatted
list. Every other workspace package is in the build lists; add the three new
packages next to their alphabetical neighbours.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants