Skip to content

Commit

Permalink
loki.process: document limitation of stage.json (#6082)
Browse files Browse the repository at this point in the history
* loki.process: document limitation of stage.json

Signed-off-by: Paschalis Tsilias <[email protected]>

* Add example error for future grepping

Signed-off-by: Paschalis Tsilias <[email protected]>

* Apply Clayton's suggestions

Signed-off-by: Paschalis Tsilias <[email protected]>

---------

Signed-off-by: Paschalis Tsilias <[email protected]>
Co-authored-by: Clayton Cornell <[email protected]>
  • Loading branch information
tpaschalis and clayton-cornell authored Jan 10, 2024
1 parent ed6128e commit ee98c5f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/sources/flow/reference/components/loki.process.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,20 @@ following key-value pair to the set of extracted data.
username: agent
```

{{% admonition type="note" %}}
Due to a limitation of the upstream jmespath library, you must wrap any string
that contains a hyphen `-` in quotes so that it's not considered a numerical
expression.

If you don't use quotes to wrap a string that contains a hyphen, you will get
errors like: `Unexpected token at the end of the expression: tNumber`

You can use one of two options to circumvent this issue:

1. An escaped double quote. For example: `http_user_agent = "\"request_User-Agent\""`
1. A backtick quote. For example: ``http_user_agent = `"request_User-Agent"` ``
{{% /admonition %}}

### stage.label_drop block

The `stage.label_drop` inner block configures a processing stage that drops labels
Expand Down

0 comments on commit ee98c5f

Please sign in to comment.