OTTL Statement
Definition
The OpenTelemetry Transformation Language (OTTL) is a small, domain-specific programming language intended to process data with OpenTelemetry-native concepts and constructs. An OTTL Statement is an expression that performs an action on telemetry data, such as setting, deleting, or transforming attributes.
OTTL statements are used by the OpenTelemetry Transform Processor to modify telemetry data as it passes through the collector pipeline: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/transformprocessor/README.md
Statements are only valid for specific evaluation contexts: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/README.md#getting-started
Examples:
set(attributes["http.request.method"], "GET")sets an attribute value.delete_key(attributes, "http.request.header.authorization")removes a sensitive attribute.truncate_all(attributes, 100)truncates all attribute values to 100 characters.
Used by 1
These schemas and endpoints reference this type directly.