-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add support for writing each batch of records as a CLP IR file; Replace Fluent Bit Go MessagePack decoder with our own implementation. #3
Conversation
reverted context back to config since wasn't being used |
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.
Some small tweaks to doc strings / comments.
Fixing comments for better readability Co-authored-by: davidlion <[email protected]>
Co-authored-by: davidlion <[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.
Add support for writing each batch of records as a CLP IR file; Replace Fluent Bit Go MessagePack decoder with our own implementation.
Description
Plugin can now retrieve chunks from the fluent-bit engine and encode them as compressed IR. After encoding, the plugin will write the chunk to a local file. I added the following files:
decoder.go
to fix the msgpack string decoding issue mentioned in the last PRir.go
to help with conversion to IRThe next step is to send this same chunk to S3.
single key
A fluent-bit record is a JSON-like object, and while CLP can parse JSON into IR it is not recommended. To resolve this issue, the user can specify a key, and the plugin will look for the key in the fluent-bit record, and output the key's value instead of the whole record. Typically, fluent-bit configurations with no parser setup will have the key "log" in the record containing the unstructured log, so the user should specify the key "log" to convert their unstructured logs into IR. As a fallback for logs missing a key, and for users who do want to compress parsed JSON, the plugin does support converting the entire JSON record.
warning
Do not run this development version for long durations. It will generate a small file every second to your local system.
Validation performed
Confirmed that CLP package can compress and search the compressed IR outputted by the plugin