Add log.flags and object metadata to aws-s3 input events#26267
Add log.flags and object metadata to aws-s3 input events#26267andrewkroh merged 3 commits intoelastic:masterfrom
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
leehinman
left a comment
There was a problem hiding this comment.
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 <andrew.kroh@elastic.co>
* 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.flagsfield created by the line readers to aws-s3 events.log.flagscontains metadata likemultilineandtruncatedto 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-Modifiedtimestamp 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.asciidocorCHANGELOG-developer.next.asciidoc.