Trace Note
A node that writes a line of your own into the trace of the execution, with values of the execution filled in.
3 min read
Trace Note leaves a note in the trace of an execution. The note is a line you write, with values of the execution put into it, and the flow goes on.
- Node
- Trace Note
- Type
log- Category
- Decision
- Ports
- Default
defaultmust be connected
- Default
- Ends the path
- No
What it does
When an execution reaches the node, the node fills the placeholders of its message, writes the note into the trace with its level, and leaves through Default.
A placeholder is a path in double braces: {{ input.plan }}, {{ nodes.check.output.met }}. The value at the path takes its place.
A number and a text are written as they are. A flag is written as
1fortrueand as nothing forfalse.A placeholder whose path finds nothing, or finds a list, an object or
null, stays in the note as it was typed.
The note is part of the trace, and nothing else: it is not an audit record, it raises no alert and sends no webhook. It is kept as long as the trace — 30 days by default.
When to use it
See a value of an execution. The outputs of the nodes are not kept in the trace, so a note is how one of them gets there.
Mark which branch an execution took, in words a person reads.
Do not put into a note what must not be stored: a value of the input written into the message is kept in the trace as plain text.
Settings
| Setting | What it is for |
|---|---|
message | The line written into the trace, at most 500 characters. A path in double braces is replaced with the value of the execution at that path. |
level | info, warning or error — how the line is marked in the trace. Nothing else depends on it. A node without a level writes info. |
In the builder the settings are Message and Level. A note of a new node is empty, at the level Info.
Ports
The node has one port, Default, and it is required. A flow in which it leads nowhere is not published.
Output
{ "message": "Plan: pro" }The output is the note as it was written into the trace. A later node reads it as nodes.<key>.output.message.
Errors
The node raises no error. A placeholder it could not fill is named in a warning event right after the note: unknown_path when the path finds nothing, type_mismatch when it finds a value a line of text cannot show.
[
{ "type": "warning", "node_key": "note", "payload": { "reason": "unknown_path", "paths": ["context.region"] } },
{ "type": "warning", "node_key": "note", "payload": { "reason": "type_mismatch", "paths": ["input.messages"] } }
]The settings are checked when the flow is validated and when it is published.
In the API an entry of issues names such a check in params.detail; its code is invalid_node_config.
| Check | Message in the builder |
|---|---|
log_unsupported_level | “{node}” uses a level that does not exist. |
log_invalid_message | The message of “{node}” must be text of at most {max} characters. |
Example
- Request — Default → Condition
- Condition — Met → Trace Note
- Trace Note — Default → AI Model
- Condition — Not met → Reject Request
- AI Model — Success → Return Response
The note below stands on the branch that calls the model. In the trace of each execution that took the branch it reads «Plan: pro».
Plan: {{ context.plan }}Related
Inspect an execution — where the trace of an execution is read.
Execution context and paths — what a placeholder may read.
How a flow is built — every node of the builder.
Built from openapi b070e1f, sdk contract 5cc7055, php ae4a53b, node 84bc62d