Skip to content
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

[8.x](backport #41424) [libbeat]: Add lowercase processor #41526

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 5, 2024

Proposed commit message

Part of #22254

This PR implements the lowercase processor. It continues the implementation done here #34022. It converts event keys that match the provided fields to lowercase. It performs case insensitive matching by default

Example:

Fields:  []string{"Field1"}   // list of provided fields

Event:{
          "Field1": "Field2",
          "Field3": "Value",
},

Output:{
        "field1": "Field2",
        "Field3": "Value",
},

NewAlterFieldProcessor can be used to extend uppercase processor.


This is an automatic backport of pull request #41424 done by [Mergify](https://mergify.com).

* [libbeat] Add lowercase_fields and uppercase_fields processors

* [libbeat]: Add lowercase_key processor

* only loweercase

* changelog

* addressed comments minus documentation

* addressed comments & documentation

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/alterFieldProcessor.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/alterFieldProcessor.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/alterFieldProcessor.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/lowercase.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/alterFieldProcessor.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/alterFieldProcessor.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/alterFieldProcessor.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/lowercase.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* case insensitive search

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* case insensitive search

* using flattenkeys

* changelog

* cosmetic changes

* lowercase with flattenKeys

* lowercase with foldvalue

* Update CHANGELOG.next.asciidoc

Co-authored-by: Denis <[email protected]>

* resolved conflicts

* added license

* full_path search

* cosmetic changes

* using alterpath

* update version

* refactor

* linter issues

* fix

* fix

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/alterFieldProcessor.go

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* Update libbeat/processors/actions/docs/lowercase.asciidoc

Co-authored-by: Denis <[email protected]>

* skip mandatory fields with test

* skip mandatory fields

* additonal logic to skipping mandatory field

* optimization

* fix test case

* fix flaky test

---------

Co-authored-by: davidifr <[email protected]>
Co-authored-by: Denis <[email protected]>
(cherry picked from commit bfde79f)
@mergify mergify bot requested review from a team as code owners November 5, 2024 15:03
@mergify mergify bot added the backport label Nov 5, 2024
@mergify mergify bot requested review from mauri870 and faec and removed request for a team November 5, 2024 15:03
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 5, 2024
@khushijain21 khushijain21 enabled auto-merge (squash) November 5, 2024 15:06
@khushijain21 khushijain21 disabled auto-merge November 5, 2024 15:06
@rdner rdner enabled auto-merge (squash) November 5, 2024 15:59
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Nov 5, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 5, 2024
@rdner rdner merged commit 0003eaf into 8.x Nov 5, 2024
142 checks passed
@rdner rdner deleted the mergify/bp/8.x/pr-41424 branch November 5, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants