For the complete documentation index, see llms.txt. This page is also available as Markdown.

OpenTelemetry

File-based configuration

You can add _FILE to individual variables to provide their configuration in a separate file. Refer to Keeping sensitive data in separate files for more details.

n8n can export workflow and node execution traces over OTLP to an OpenTelemetry collector. Refer to OpenTelemetry tracing for details.

Variable
Type
Default
Description
Available from

N8N_OTEL_ENABLED

Boolean

false

Whether to enable OpenTelemetry tracing. When set to false, n8n doesn't load the OpenTelemetry SDK.

2.19.0

N8N_OTEL_EXPORTER_OTLP_ENDPOINT

String

http://localhost:4318

Base URL of the OTLP endpoint to export traces to. The value must be an http:// or https:// URL. If it isn't, n8n logs a warning and uses the default. For http/protobuf, n8n appends the value of N8N_OTEL_EXPORTER_OTLP_TRACING_PATH to this URL.

2.19.0

N8N_OTEL_EXPORTER_OTLP_PROTOCOL

String

http/protobuf

OTLP transport for exporting traces. Valid values: http/protobuf and grpc. The name and values match the upstream OTEL_EXPORTER_OTLP_PROTOCOL specification. Refer to Choose the OTLP protocol for guidance.

2.39.0

N8N_OTEL_EXPORTER_OTLP_TRACING_PATH

String

/v1/traces

Path appended to N8N_OTEL_EXPORTER_OTLP_ENDPOINT for exporting traces. n8n ignores this variable when N8N_OTEL_EXPORTER_OTLP_PROTOCOL is grpc, because gRPC endpoints take no URL path.

2.19.0

N8N_OTEL_EXPORTER_OTLP_HEADERS

String

-

Comma-separated list of key=value pairs to send as HTTP headers with each OTLP request. Use this for authentication tokens or tenant headers. For example: authorization=Bearer <token>,x-tenant=acme. With the grpc protocol, n8n sends these as gRPC metadata and converts the keys to lowercase.

2.19.0

N8N_OTEL_EXPORTER_SERVICE_NAME

String

n8n

Value of the service.name resource attribute on exported spans.

2.19.0

N8N_OTEL_TRACES_SAMPLE_RATE

Number

1.0

Fraction of traces to export, between 0 and 1. n8n uses a trace ID ratio sampler, so all spans in a trace are either sampled or dropped together.

2.19.0

N8N_OTEL_TRACES_INCLUDE_NODE_SPANS

Boolean

true

Whether to emit a node.execute span for each node execution. Set to false to export workflow-level spans only.

2.19.0

N8N_OTEL_TRACES_CUSTOM_ATTRIBUTE_PREFIXES

String

-

JSON object that changes or removes the prefix on custom span attribute keys, for example {"project":"","node":""}. Refer to Change the attribute prefixes.

2.46.0

N8N_OTEL_TRACES_EMIT_WORKFLOW_START_SPAN

Boolean

false

Whether to send a 0 ms workflow.execute.started span when a workflow execution starts. Refer to Start spans.

2.44.0

N8N_OTEL_TRACES_EMIT_NODE_START_SPAN

Boolean

false

Whether to send a 0 ms node.execute.started span when a node execution starts. Needs N8N_OTEL_TRACES_INCLUDE_NODE_SPANS set to true. Refer to Start spans.

2.44.0

N8N_OTEL_TRACES_PRODUCTION_ONLY

Boolean

true

Whether to export traces for production executions only. Set to false to export traces for all workflow executions.

2.25.2

N8N_OTEL_TRACES_INJECT_OUTBOUND

Boolean

true

Whether n8n adds tracing headers to outbound HTTP requests made by nodes that use n8n's HTTP helpers. When true, n8n sends traceparent, tracestate, and baggage (from n8n 2.47.0). Use OTEL_PROPAGATORS to narrow the set. Refer to Outbound trace headers.

2.19.0

OTEL_PROPAGATORS

String

tracecontext,baggage

Comma-separated list naming which headers n8n writes while N8N_OTEL_TRACES_INJECT_OUTBOUND is true. Valid names: tracecontext (sends traceparent and tracestate), baggage, and none. Set it to tracecontext to stop n8n forwarding the caller's baggage entries downstream. n8n reads it once at startup, so a change needs a restart. Refer to Outbound trace headers.

2.47.0

N8N_OTEL_STARTUP_CONNECTIVITY_TIMEOUT_MS

Number

2000

Timeout (in milliseconds) for the startup connectivity check against the OTLP endpoint. n8n logs an error if the endpoint isn't reachable within this period.

2.19.0

N8N_AGENTS_TRACING_ENABLED

Boolean

true

Whether agent runs emit OpenTelemetry spans. Inherits the endpoint, headers, sampling, and transport settings from N8N_OTEL_*. Spans have nowhere to go until you configure an OTel provider, so set this to false to run workflow tracing without agent spans.

2.33.0

N8N_AGENTS_TRACING_RECORD_INPUTS

Boolean

true

Whether agent tracing records inputs, such as prompts and tool arguments. Set to false to exclude sensitive input data from traces.

2.33.0

N8N_AGENTS_TRACING_RECORD_OUTPUTS

Boolean

true

Whether agent tracing records outputs, such as responses and tool results. Set to false to exclude sensitive output data from traces.

2.33.0

Last updated

Was this helpful?