Trace
Category: Monitoring
Node id: trace
Provides distributed tracing with trace/span lifecycle management, events, tags, and querying
What it does
- Full trace lifecycle: start, end, get, query, and export traces
- Span management: start, end, and retrieve individual spans
- Parent-child span relationships for nested tracing
- Span event recording with timestamped attributes
- Tag management for both traces and spans
- Span kinds: client, server, producer, consumer, internal
- Query traces/spans by service name and status filters
- Auto-generated trace and span IDs using crypto/rand
Use cases
- Trace end-to-end pipeline execution across multiple node handlers
- Monitor inter-service communication latency in healthcare workflows
- Debug slow pipeline steps by examining span durations
- Export traces for integration with observability platforms (Jaeger, Zipkin)
- Correlate logs and metrics with distributed trace context
Runtime
- Performance tier:
fast
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
trace_id | text | No | Trace ID from upstream (alternative to config) |
span_id | text | No | Span ID from upstream (alternative to config) |
tags | json | No | Tags to set on trace or span (key-value map) |
metadata | json | No | Metadata to attach to traces |
attributes | json | No | Attributes for span events |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Full trace result object |
success | boolean | No | Whether the operation succeeded |
count | number | No | Number of items processed |
operation | text | No | Operation performed |
trace_id | text | No | Trace ID string (for downstream propagation) |
span_id | text | No | Span ID string (for downstream propagation) |
trace | json | No | Trace object (trace operations) |
span | json | No | Span object (span operations) |
spans | json | No | Array of spans (query operations) |
summary | json | No | Operation summary |
processed_at | text | No | Timestamp of processing |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Operation | operation | enum | No | start_trace | start_trace, end_trace, start_span, end_span, add_event, add_tags, get_trace, get_span, query_traces, export | Tracing operation to perform |
| Trace ID | trace_id | string | No | Trace identifier (auto-generated if empty for start_trace) | ||
| Span ID | span_id | string | No | Span identifier (auto-generated if empty for start_span) | ||
| Service Name | service_name | string | No | unknown | Name of the service | |
| Span Name | name | string | No | unknown | Name of the span | |
| Span Kind | kind | enum | No | internal | client, server, producer, consumer, internal | Type of span |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Parent Span ID | parent_id | string | No | Parent span ID for nested spans | ||
| Status | status | string | No | success | Status to set when ending trace/span | |
| Event Name | event_name | string | No | Name of the event to add (add_event operation) | ||
| Tags | tags | json | No | Static tags to set | ||
| Attributes | attributes | json | No | Static attributes for events | ||
| Service Filter | service_filter | string | No | Filter traces by service (query operation) | ||
| Status Filter | status_filter | string | No | Filter traces by status (query operation) | ||
| Limit | limit | number | No | 100 | Maximum results for query |
Errors
| Code | Description |
|---|---|
MISSING_TRACE_ID | trace_id is required for this operation but was not provided |
MISSING_SPAN_ID | span_id is required for this operation but was not provided |
TRACE_NOT_FOUND | No trace exists with the given trace_id |
SPAN_NOT_FOUND | No span exists with the given span_id |
UNSUPPORTED_OPERATION | Operation is not one of the supported tracing operations |
Runtime notes
- Output keys are conditional: trace_id/trace appear only for trace operations, span_id/span for span operations, spans for query_traces
- Wire trace_id output to downstream trace nodes to propagate trace context through the pipeline
- Traces and spans are stored in-memory — data is lost on process restart; use export for persistence
- Config values for trace_id/span_id take precedence over input port values
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..