Merged
Size
XL
Change Breakdown
Feature85%
Bug Fix15%
#27789feat(core): OTEL - workflow node tracing

Node spans now emitted in workflow traces

Node spans now emitted in workflow traces

n8n workflows can now be traced at the individual node level, with each node emitting its own span containing input/output metrics, execution status, and an optional custom tracing bag for arbitrary metadata.

Before this change, n8n only traced workflows as a single unit. When something went wrong, developers had to piece together what happened by parsing logs or manually instrumenting their nodes.

Workflows can now be traced at the individual node level. Each node that executes generates its own span nested within the workflow span, capturing the node ID, name, type, version, input item count, and output item count. If a node throws an error, the span is marked with error status and includes exception details. Nodes can also write arbitrary key-value pairs to a new tracing bag, which gets attached to the span as custom attributes for deeper introspection.

When a workflow is cancelled, any nodes still running get their spans closed with a termination reason of "workflow_cancelled" so traces remain consistent. Node span tracing is enabled by default but can be disabled via the N8N_OTEL_TRACES_INCLUDE_NODE_SPANS environment variable.

The tracing bag lets node developers add custom telemetry without touching the core instrumentation layer—write to taskData.metadata.tracing, and it appears in OTEL with a n8n.node.custom. prefix. This makes it straightforward to trace business logic events, record processing milestones, or surface debug information that would otherwise require digging through logs.

This lives in the @n8n/otel module within the CLI package and builds on the existing workflow-level tracing infrastructure that was already in place.

View Original GitHub Description

Summary

Adds "node level" tracing. <img width="2469" height="394" alt="image" src="https://github.com/user-attachments/assets/a965068a-0d1b-47ab-b454-d01afe831d0d" /> <img width="2462" height="885" alt="image" src="https://github.com/user-attachments/assets/c6a2e709-4685-4434-8b2c-d0eabd891169" />

Also exposes a tracing bag that node's can write to that will land the data into OTEL.

Related Linear tickets, Github issues, and Community forum posts

ligo-394

Review / Merge checklist

  • PR title and summary are descriptive. (conventions) <!-- **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** -->
  • Docs updated or follow-up ticket created.
  • Tests included. <!-- A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. -->
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)
© 2026 · via Gitpulse