diff --git a/docs/sources/reference/components/otelcol/otelcol.processor.filter.md b/docs/sources/reference/components/otelcol/otelcol.processor.filter.md index df75e477e4..e376f6bea1 100644 --- a/docs/sources/reference/components/otelcol/otelcol.processor.filter.md +++ b/docs/sources/reference/components/otelcol/otelcol.processor.filter.md @@ -197,7 +197,7 @@ information. ### Drop spans which contain a certain span attribute -This example sets the attribute `test` to `pass` if the attribute `test` does not exist. +This example drops the signals that have the attribute `container.name` set to the value `app_container_1`. ```alloy otelcol.processor.filter "default" { @@ -205,7 +205,7 @@ otelcol.processor.filter "default" { traces { span = [ - "attributes[\"container.name\"] == \"app_container_1\"", + `attributes["container.name"] == "app_container_1"`, ] } @@ -217,8 +217,6 @@ otelcol.processor.filter "default" { } ``` -Each `"` is [escaped][] with `\"` inside the {{< param "PRODUCT_NAME" >}} syntax string. - ### Drop metrics based on either of two criteria This example drops metrics which satisfy at least one of two OTTL statements: @@ -231,8 +229,8 @@ otelcol.processor.filter "default" { metrics { metric = [ - "name == \"my.metric\" and resource.attributes[\"my_label\"] == \"abc123\"", - "type == METRIC_DATA_TYPE_HISTOGRAM", + `name == "my.metric" and resource.attributes["my_label"] == "abc123"`, + `type == METRIC_DATA_TYPE_HISTOGRAM`, ] } @@ -244,11 +242,6 @@ otelcol.processor.filter "default" { } ``` - -Some values in the {{< param "PRODUCT_NAME" >}} syntax string are [escaped][]: -* `\` is escaped with `\\` -* `"` is escaped with `\"` - ### Drop non-HTTP spans and sensitive logs ```alloy @@ -257,14 +250,14 @@ otelcol.processor.filter "default" { traces { span = [ - "attributes[\"http.request.method\"] == nil", + `attributes["http.request.method"] == nil`, ] } logs { log_record = [ - "IsMatch(body, \".*password.*\")", - "severity_number < SEVERITY_NUMBER_WARN", + `IsMatch(body, ".*password.*")`, + `severity_number < SEVERITY_NUMBER_WARN`, ] } @@ -276,13 +269,6 @@ otelcol.processor.filter "default" { } ``` -Each `"` is [escaped][] with `\"` inside the {{< param "PRODUCT_NAME" >}} syntax string. - - -Some values in the {{< param "PRODUCT_NAME" >}} syntax strings are [escaped][]: -* `\` is escaped with `\\` -* `"` is escaped with `\"` - [escaped]: ../../../../get-started/configuration-syntax/expressions/types_and_values/#strings diff --git a/docs/sources/reference/components/otelcol/otelcol.processor.transform.md b/docs/sources/reference/components/otelcol/otelcol.processor.transform.md index 8027f2277d..b833ecc6d0 100644 --- a/docs/sources/reference/components/otelcol/otelcol.processor.transform.md +++ b/docs/sources/reference/components/otelcol/otelcol.processor.transform.md @@ -306,10 +306,6 @@ otelcol.processor.transform "default" { } ``` -Each statement is enclosed in backticks instead of quotation marks. -This constitutes a [raw string][raw-strings], and lets us avoid the need to escape -each `"` with a `\"` inside a [normal][strings] {{< param "PRODUCT_NAME" >}} syntax string. - ### Rename a resource attribute The are two ways to rename an attribute key. @@ -356,10 +352,6 @@ otelcol.processor.transform "default" { } ``` -Each statement is enclosed in backticks instead of quotation marks. -This constitutes a [raw string][raw-strings], and lets us avoid the need to escape -each `"` with a `\"`, and each `\` with a `\\` inside a [normal][strings] {{< param "PRODUCT_NAME" >}} syntax string. - ### Create an attribute from the contents of a log body This example sets the attribute `body` to the value of the log body: @@ -383,10 +375,6 @@ otelcol.processor.transform "default" { } ``` -Each statement is enclosed in backticks instead of quotation marks. -This constitutes a [raw string][raw-strings], and lets us avoid the need to escape -each `"` with a `\"` inside a [normal][strings] {{< param "PRODUCT_NAME" >}} syntax string. - ### Combine two attributes This example sets the attribute `test` to the value of attributes `service.name` and `service.version` combined. @@ -399,7 +387,7 @@ otelcol.processor.transform "default" { context = "resource" statements = [ // The Concat function combines any number of strings, separated by a delimiter. - `set(attributes["test"], Concat([attributes["foo"], attributes["bar"]], " "))`, + `set(attributes["test"], Concat([attributes["service.name"], attributes["service.version"]], " "))`, ] } @@ -411,10 +399,6 @@ otelcol.processor.transform "default" { } ``` -Each statement is enclosed in backticks instead of quotation marks. -This constitutes a [raw string][raw-strings], and lets us avoid the need to escape -each `"` with a `\"` inside a [normal][strings] {{< param "PRODUCT_NAME" >}} syntax string. - ### Parsing JSON logs Given the following JSON body: @@ -463,10 +447,6 @@ otelcol.processor.transform "default" { } ``` -Each statement is enclosed in backticks instead of quotation marks. -This constitutes a [raw string][raw-strings], and lets us avoid the need to escape -each `"` with a `\"`, and each `\` with a `\\` inside a [normal][strings] {{< param "PRODUCT_NAME" >}} syntax string. - ### Various transformations of attributes and status codes The example takes advantage of context efficiency by grouping transformations @@ -565,10 +545,6 @@ otelcol.exporter.otlp "default" { } ``` -Each statement is enclosed in backticks instead of quotation marks. -This constitutes a [raw string][raw-strings], and lets us avoid the need to escape -each `"` with a `\"`, and each `\` with a `\\` inside a [normal][strings] {{< param "PRODUCT_NAME" >}} syntax string. - [strings]: ../../../../get-started/configuration-syntax/expressions/types_and_values/#strings [raw-strings]: ../../../../get-started/configuration-syntax/expressions/types_and_values/#raw-strings