Skip to content

Commit 8de1e8f

Browse files
[processor/transform] Update readme (#34268)
Co-authored-by: Evan Bradley <[email protected]>
1 parent 8c25e9f commit 8de1e8f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

processor/transformprocessor/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@ Each condition and statement can access and transform telemetry using functions
2929

3030
The transform processor allows configuring multiple context statements for traces, metrics, and logs.
3131
The value of `context` specifies which [OTTL Context](#contexts) to use when interpreting the associated statements.
32-
The conditions and statement strings, which must be OTTL compatible, will be passed to the OTTL and interpreted using the associated context. The conditions string should contain a string with a WHERE clause body without the `where` keyword at the beginning.
33-
Each context will be processed in the order specified and each condition and statement for a context will be executed in the order specified. Conditions are executed first, if a context doesn't meet the conditions, the associated statement will be skipped.
32+
The global conditions and statement strings, which must be OTTL compatible, will be passed to OTTL and interpreted using the associated context.
33+
The condition string should contain a Where clause body without the `where` keyword at the beginning.
34+
35+
Each context will be processed in the order specified.
36+
Within a context, each global condition is checked and if any evaluates to true, the statements are executed in order.
37+
If a context doesn't meet any of the conditions, then the associated statement will be skipped.
38+
39+
Each statement may have a Where clause that acts as an additional check for whether to execute the statement.
3440

3541
The transform processor also allows configuring an optional field, `error_mode`, which will determine how the processor reacts to errors that occur while processing a statement.
3642

@@ -71,7 +77,7 @@ Valid values for `context` are:
7177
| metric_statements | `resource`, `scope`, `metric`, and `datapoint` |
7278
| log_statements | `resource`, `scope`, and `log` |
7379

74-
`conditions` is a list comprised of multiple where clauses, which will be processed as global conditions for the accompanying set of statements.
80+
`conditions` is a list comprised of multiple where clauses, which will be processed as global conditions for the accompanying set of statements. The conditions are ORed together, which means only one condition needs to evaluate to true in order for the statements (including their individual Where clauses) to be executed.
7581

7682
```yaml
7783
transform:

0 commit comments

Comments
 (0)