Skip to content

pipeline: parsers: decoders: general cleanup #1878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexakreizinger
Copy link
Member

this PR is part of the effort to meet guidelines for style, clarity, and consistency.

@alexakreizinger alexakreizinger requested review from a team as code owners July 7, 2025 23:58
Signed-off-by: Alexa Kreizinger <[email protected]>
Copy link
Contributor

@lockewritesdocs lockewritesdocs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🦖

There are cases where the log messages being parsed contain encoded data. A typical
use case can be found in containerized environments with Docker. Docker logs its
data in JSON format, which uses escaped strings.
There are cases where the log messages that you want to parse contain encoded data. A typical use case can be found in containerized environments with Docker. Docker logs its data in JSON format, which uses escaped strings.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There are cases where the log messages that you want to parse contain encoded data. A typical use case can be found in containerized environments with Docker. Docker logs its data in JSON format, which uses escaped strings.
There are cases where the log messages you want to parse contain encoded data. A typical use case can be found in containerized environments with Docker. Docker logs its data in JSON format, which uses escaped strings.

@@ -16,20 +14,18 @@ The Docker log message encapsulates something like this:
{"log":"{\"status\": \"up and running\"}\r\n","stream":"stdout","time":"2018-03-09T01:01:44.851160855Z"}
```

The original message is handled as an escaped string. Fluent Bit wants to use the
original structured message and not a string.
The original message is handled as an escaped string. Fluent Bit wants to use the original structured message and not a string.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanting something is what a human would do, and not an application. It can request things. It can do things. But it doesn't want things.

Suggested change
The original message is handled as an escaped string. Fluent Bit wants to use the original structured message and not a string.
The original message is handled as an escaped string. Fluent Bit will use the original structured message, and not a string.


Decoders are a built-in feature available through the Parsers file. Each parser
definition can optionally set one or more decoders. There are two types of decoders:
Decoders are a built-in feature of parsers in Fluent Bit. Each parser definition can optionally set one or more decoders. There are two types of decoders:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to use this exact suggestion, but I'm trying to get us out of the habit of saying "here are the two types" or "select from these three options", because putting a number in there makes potential technical debt. What if they add another type? Then we need to not only add the info, but to update the intro section for that list. It's a small thing, but it adds up.

Suggested change
Decoders are a built-in feature of parsers in Fluent Bit. Each parser definition can optionally set one or more decoders. There are two types of decoders:
Decoders are a built-in feature of parsers in Fluent Bit. Each parser definition can optionally set one or more decoders. Select from one of these decoder types:

- `Decode_Field`: If successful, can only be applied once for the same field.
`Decode`_Field` is intended to decode a structured message.
- `Decode_Field_As`: If successful, another decoder of the same type and the same field can be applied only if the data continues being an unstructured message (raw text).
- `Decode_Field`: If successful, can only be applied once for the same field. `Decode_Field` is intended to decode a structured message.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `Decode_Field`: If successful, can only be applied once for the same field. `Decode_Field` is intended to decode a structured message.
- `Decode_Field`: If successful, can be applied only once for the same field. `Decode_Field` is intended to decode a structured message.

Copy link
Contributor

@cnorris-cs cnorris-cs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left suggestions, but I've added my approval based on that to keep this moving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants