session-metadata-enrich (Processing Node)
Use session-metadata-enrich to apply a small JSON object payload into the session metadata. This is intended for adding reporting-friendly keys derived from upstream node outputs, without changing dashboards or dimensions.
How it works
- Reads the latest upstream input payload.
- Validates the payload against strict guardrails.
- If valid, applies each root key into
session.metadata(persisted via the runner runtime’s session metadata update behavior).
Guardrails
The node fails if any of the following are true:
- Size: payload is larger than 20KB (measured on raw bytes).
- Not JSON: payload is not valid JSON.
- Wrong shape: top-level JSON is not an object (arrays are not allowed at the top level).
- Arrays anywhere: arrays are not permitted anywhere in the payload, including nested values.
- Restricted root keys: the payload contains any of the following root keys:
statusstartTimeutctimeWindowSecondsmachineGroupopenedByparticipantsclosedAtclosedByreasonuserId
- Reserved keys: any root key starting with
_is rejected.
Example input
{
"reporting": {
"unit": "Alpha",
"kpis": {
"detections": 12,
"timeOnTargetSeconds": 840
}
},
"reportVersion": "1.0"
}Resulting session metadata (illustrative)
After the node runs successfully, the session metadata will include:
{
"...existingSessionMetadata": "unchanged",
"reporting": {
"unit": "Alpha",
"kpis": {
"detections": 12,
"timeOnTargetSeconds": 840
}
},
"reportVersion": "1.0"
}Integration in a session template
Place this node after the node that produces the reporting payload you want to apply.