-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 log.flags and object metadata to aws-s3 input events #26267
Add log.flags and object metadata to aws-s3 input events #26267
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
e1a50d5
to
d0e7758
Compare
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
d0e7758
to
4618a93
Compare
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.
What do you think about adding the meta data to the s3Info struct?
The meta data feels like a good fit with the other data in s3Info, and we already passing an s3Info into all the functions so it would shorten the argument list.
This pull request is now in conflicts. Could you fix it? 🙏
|
This adds the log.flags field created by the line readers to aws-s3 events. log.flags contains metadata like `multiline` and `truncated` to indicate how the data was processed. This also adds a config option to include S3 object metadata in the event if it exists. The use case for me was to get the Last-Modified timestamp for cases where the log does not have a timestamp or it cannot be parsed. Then this can be used as a fallback.
c414773
to
e8a0f65
Compare
@leehinman Good idea. Looks better after that change. |
* Add log.flags and object metadata to aws-s3 input events This adds the log.flags field created by the line readers to aws-s3 events. log.flags contains metadata like `multiline` and `truncated` to indicate how the data was processed. This also adds a config option to include S3 object metadata in the event if it exists. The use case for me was to get the Last-Modified timestamp for cases where the log does not have a timestamp or it cannot be parsed. Then this can be used as a fallback. * Pass metadata using s3Info struct to avoid adding new func params (cherry picked from commit c25fca8)
…6298) * Add log.flags and object metadata to aws-s3 input events This adds the log.flags field created by the line readers to aws-s3 events. log.flags contains metadata like `multiline` and `truncated` to indicate how the data was processed. This also adds a config option to include S3 object metadata in the event if it exists. The use case for me was to get the Last-Modified timestamp for cases where the log does not have a timestamp or it cannot be parsed. Then this can be used as a fallback. * Pass metadata using s3Info struct to avoid adding new func params (cherry picked from commit c25fca8) Co-authored-by: Andrew Kroh <[email protected]>
* Add log.flags and object metadata to aws-s3 input events This adds the log.flags field created by the line readers to aws-s3 events. log.flags contains metadata like `multiline` and `truncated` to indicate how the data was processed. This also adds a config option to include S3 object metadata in the event if it exists. The use case for me was to get the Last-Modified timestamp for cases where the log does not have a timestamp or it cannot be parsed. Then this can be used as a fallback. * Pass metadata using s3Info struct to avoid adding new func params
What does this PR do?
This adds the
log.flags
field created by the line readers to aws-s3 events.log.flags
contains metadata likemultiline
andtruncated
to indicate how the data was processed.This also adds a config option to include S3 object metadata in the event if it exists. The use case for me was to get the
Last-Modified
timestamp for cases where the log does not have a timestamp or it cannot be parsed. Then this can be used as a fallback.Why is it important?
It makes the S3 log reader behave more similar to the log reader. And having access to the S3 headers gives users a bit more flexibility in their use-cases.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.