You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/ottl/LANGUAGE.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
3
3
The OTTL grammar includes function invocations, Values and Boolean Expressions. These parts all fit into a Statement, which is the basis of execution in the OTTL.
4
4
5
+
### Design principles
6
+
7
+
OTTL is intended as a domain-specific language (DSL) for telemetry mutation and generation,
8
+
and is not intended to be used as a general-purpose programming language.
9
+
10
+
OTTL has been designed to work directly with [pdata](https://github.com/open-telemetry/opentelemetry-collector/tree/main/pdata), but can operate on other data formats.
11
+
5
12
### Editors
6
13
7
14
Editors are functions that transform the underlying telemetry payload. They may return a value, but typically do not. There must be a single Editor Invocation in each OTTL statement.
@@ -288,4 +295,4 @@ It is possible to update the Value in a telemetry field using a Setter. For read
288
295
289
296
## Logging inside a OTTL function
290
297
291
-
To emit logs inside a OTTL function, add a parameter of type [`component.TelemetrySettings`](https://pkg.go.dev/go.opentelemetry.io/collector/component#TelemetrySettings) to the function signature. The OTTL will then inject the TelemetrySettings that were passed to `NewParser` into the function. TelemetrySettings can be used to emit logs.
298
+
To emit logs inside a OTTL function, add a parameter of type [`component.TelemetrySettings`](https://pkg.go.dev/go.opentelemetry.io/collector/component#TelemetrySettings) to the function signature. The OTTL will then inject the TelemetrySettings that were passed to `NewParser` into the function. TelemetrySettings can be used to emit logs.
0 commit comments