Insert XML Elements
Inserts an XML fragment at an XPath location inside an XML string. A common use is back-filling empty elements with a placeholder so they survive a later parse. The output is the modified XML string.
Supported Telemetry Types
Linux
✓
✓
✓
Windows
✓
✓
✓
macOS
✓
✓
✓
AIX
✓
✓
✓
Kubernetes Node
✓
✓
✓
Kubernetes Cluster
✓
✓
✓
Kubernetes Gateway
✓
✓
✓
OpenShift Node
✓
✓
✓
OpenShift Cluster
✓
✓
✓
OpenShift Gateway
✓
✓
✓
Google SecOps Pipelines
✓
✓
✓
Choose Telemetry Type picks one signal per processor instance. Add another instance to handle a second signal.
Configuration
Basic Configuration

What to insert, and where
Choose Telemetry Type
Telemetry Selector
Yes
Logs
The signal this instance runs on: Logs, Metrics, or Traces (one at a time).
XPath
String
Yes
—
The XPath selecting the element(s) to insert into. Applies to all selected telemetry types.
XML To Insert
String
Yes
—
The XML fragment to insert at the XPath, for example <value>-</value>. Applies to all selected telemetry types.
Condition
OTTL Condition
No
(empty)
Insert only into records that match. Empty runs on every record.
Source and target fields
Source Field Type
Enum: Resource, Attribute, Body, Custom
Yes
Attribute
Where the XML string is read from. Body is logs-only. Custom takes any OTTL path.
Source Field
OTTL Field
Yes *
—
The field holding the XML. Bracket notation for nested fields. For a Body source, leave empty to use the whole body.
Target Field Type
Enum: Resource, Attribute, Body, Custom
Yes
Attribute
Where the modified XML is written. Body is logs-only.
Target Field
OTTL Field
Yes *
—
Destination for the modified XML. Point it at the source to edit in place. For a Body target, leave empty to use the whole body.
* The Body field type is the exception: it's optional, and leaving it empty targets the entire body.
Body is available for Logs only. For Metrics and Traces, the field type options are Resource, Attribute, and Custom.
Examples
Back-fill empty elements before a parse

XPath with a quoted predicate

XPath predicates and inserted fragments with quotes are entered as-is; embedded quotes are escaped safely when the config is generated.
Configuration Tips
Use this ahead of Parse Simplified XML to protect empty elements, which the parser would otherwise drop.
Troubleshooting
Nothing gets inserted
Symptoms: the document is unchanged after the processor runs.
Solutions:
Verify the XPath matches at least one node in the source document.
Confirm the XML To Insert fragment is well-formed (balanced tags), and that the Condition evaluates true.
Standalone Processor
Related Resources
Bindplane Resources
These XML and slice processors are designed to work together. Chain them to normalize, parse, and reshape XML end to end:
Last updated
Was this helpful?