-
Notifications
You must be signed in to change notification settings - Fork 169
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
refactor(userspace/libsinsp): support field transformers in formatters #1847
Conversation
Co-authored-by: Andrea Terzolo <[email protected]> Signed-off-by: Jason Dellaluce <[email protected]>
Signed-off-by: Jason Dellaluce <[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.
/approve
🚀
LGTM label has been added. Git tree hash: 1f596a5c2cde4a503e072e01a292f0d97c72be88
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, incertum, jasondellaluce The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area libsinsp
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This is the (hopefully) last PR on libs for the series of #1789. This lastly adds support to field transformers in libsinsp's formatters, which are also used to produce Falco rules outputs. Tests are included. This takes the chance for polishing a bit the implementation of sinsp_evt_formatter, which hasn't been touched for years.
After consulting with other maintainers and some product experts the UX decision has been that, whenever transformers are used in an output, the output field map (and the JSON output) will include both the non-transformed field and the transformed one. This will ensure that current expectations are not broken, while also including (optionally, configurable through API) the new information. Example taken from the tests:
Which issue(s) this PR fixes:
Special notes for your reviewer:
/milestone 0.17.0
Does this PR introduce a user-facing change?: