Rename Field
Overview
The Rename Field processor renames existing fields in telemetry records.
Supported types: Logs
Configuration
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
| ottl_expression | string | none | No | OTTL expression used to conditionally apply the field renaming. |
Rules
When building the ottl_expression, the UI exposes rule-based conditions.
Attributes
| Parameter | Type | Description |
|---|---|---|
| Attribute Key | string | The 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) |
| Operator | string | The 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 |
| Value | string | The value to compare against |
Note: Multiple rules can be combined in the UI using logical operators such as
ANDorOR, and the resulting rule set is converted into the finalottl_expression.
Fields To Rename
Each item in fields defines one rename operation.
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
| from_field_type | string | none | Yes | Source location to rename from. Supported values: body attribute resource. |
| from_field | string | none | Yes | Source field key or path. |
| to_field_type | string | none | Yes | Destination location to rename to. Supported values: body attribute, resource. |
| to_field | string | none | Yes | Destination field key or path. |
Note: Renaming moves the value from the source field to the destination field and removes the original field.
Example Configuration
{
"ottl_expression": "", // default: none
"fields": [
// required
{
"from_field_type": "attribute", // required, default: "attribute"
"from_field": "", // required, default: none
"to_field_type": "attribute", // required, default: "attribute"
"to_field": "", // required, default: none
},
],
}