Skip to main content

Transform OTTL

Overview

The Transform OTTL processor applies OTTL statements to log records. It allows conditional transformations using one or more statement blocks and a configurable error handling mode.

Supported types: Logs

Configuration

ParameterTypeDefaultRequiredDescription
error_modestringignoreYesControls how the processor handles errors while evaluating OTTL statements. Supported Values : ignore propagate
  • ignore Continues processing even when a statement fails.
  • propagate Propagates the error and stops processing for the current record.

Log Statements

Each item in log_statements defines a block of OTTL statements that are evaluated for logs.

ParameterTypeDefaultRequiredDescription
conditionsarray[string]noneNoOptional OTTL conditions that must be true before the statements are applied.
statementsarray[string]noneYesOTTL statements to execute when the conditions match.

Note: Conditions are optional. If no conditions are provided, the statements are always executed.

Example Configuration

{
"error_mode": "ignore", // required, default: "ignore"
"log_statements": [
{
"conditions": [], // default: none
"statements": [], // required, default: none
},
],
}