Skip to main content

Copy Fields

Overview

The Copy Fields processor copies values from one field path to another without removing the original field.

Supported types: Logs

Basic Configuration

ParameterTypeDefaultRequiredDescription
ottl_expressionstringnoneNoOTTL expression used to conditionally apply the field copying.

Rules

When building the ottl_expression, the UI exposes rule-based conditions.

Attributes

ParameterTypeDescription
Attribute KeystringThe attribute key to evaluate. Supported values: attribute; resource; log; span; metric (fields: aggregation_temporality; description; is_monotonic; name; type; unit); datapoint (fields: count; negative.offset; positive.offset; scale; sum; value_double; value_int; zero_count)
OperatorstringThe operator to use for comparison. Supported values: equals; not equals; starts with; ends with; contains; regex; ==; !=; <; >; >=; <=; is boolean; is integer; is double; is map; is string; exists; not exists
ValuestringThe value to compare against

Note: Multiple rules can be combined in the UI using logical operators such as AND or OR, and the resulting rule set is converted into the final ottl_expression.

Fields To Copy

Each item in fields defines one copy operation.

ParameterTypeDefaultRequiredDescription
from_field_typestringnoneYesSource location to copy from. Supported values: body attribute resource.
from_fieldstringnoneYesSource field key.
to_field_typestringnoneYesDestination location to copy to. Supported values: body attribute resource.
to_fieldstringnoneYesDestination field key.

Note: Copying leaves the original field unchanged.

Example Configuration

{
"ottl_expression": "", // default: none
"fields": [
// required
{
"from_field_type": "attribute", // required, default: none
"from_field": "", // required, default: none
"to_field_type": "body", // required, default: none
"to_field": "", // required, default: none
},
],
}