-
Notifications
You must be signed in to change notification settings - Fork 525
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
base: master
Are you sure you want to change the base?
pipeline: parsers: decoders: general cleanup #1878
Conversation
Signed-off-by: Alexa Kreizinger <[email protected]>
Signed-off-by: Alexa Kreizinger <[email protected]>
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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.
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: |
There was a problem hiding this comment.
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.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `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. |
There was a problem hiding this 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.
this PR is part of the effort to meet guidelines for style, clarity, and consistency.