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

[Filebeat] aws-s3 - Disable event normalization processing #33673

Merged

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Nov 14, 2022

What does this PR do?

Disable event normalization for the aws-s3 input to reduce allocations when processing events. The input only produces basic types in its events. Either it puts a string into the message field or it decodes json into a map[string]interface with encoding/json. Both of those should be fine for the downstream processors and outputs.

Relates #33657

Why is it important?

It makes Filebeat more efficient.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

Screenshots

Screen Shot 2022-11-13 at 11 18 45

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 14, 2022
@mergify
Copy link
Contributor

mergify bot commented Nov 14, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @andrewkroh? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

Disable event normalization for the aws-s3 input to reduce allocations when processing events.
The input only produces basic types in its events. Either it puts a string into the `message` field
or it decodes json into a map[string]interface with encoding/json. Both of those should be fine
for the downstream processors and outputs.

Relates elastic#33657
@andrewkroh andrewkroh force-pushed the feature/fb/aws-s3-disable-normalization branch from 9f9c060 to 4ccb09d Compare November 14, 2022 22:02
@andrewkroh andrewkroh marked this pull request as ready for review November 14, 2022 22:03
@andrewkroh andrewkroh requested a review from a team as a code owner November 14, 2022 22:03
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 15, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-11-15T01:48:21.660+0000

  • Duration: 128 min 22 sec

Test stats 🧪

Test Results
Failed 0
Passed 4924
Skipped 340
Total 5264

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@andrewkroh andrewkroh added the Team:Cloud-Monitoring Label for the Cloud Monitoring team label Nov 15, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 15, 2022
@andrewkroh andrewkroh added needs_team Indicates that the issue/PR needs a Team:* label Team:Security-External Integrations labels Nov 15, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 15, 2022
@botelastic
Copy link

botelastic bot commented Nov 15, 2022

This pull request doesn't have a Team:<team> label.

@@ -368,3 +373,6 @@ func getProviderFromDomain(endpoint string, ProviderOverride string) string {
}
return "unknown"
}

// boolPtr returns a pointer to b.
func boolPtr(b bool) *bool { return &b }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func boolPtr(b bool) *bool { return &b }
func ptr[T any](v bool) *T { return &v }

🤣

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got to start thinking more generically. 😆

@elastic elastic deleted a comment from mergify bot Nov 15, 2022
@andrewkroh andrewkroh merged commit 943187f into elastic:main Nov 15, 2022
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
Disable event normalization for the aws-s3 input to reduce allocations when processing events.
The input only produces basic types in its events. Either it puts a string into the `message` field
or it decodes json into a map[string]interface with encoding/json. Both of those should be fine
for the downstream processors and outputs.

Relates #33657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Filebeat Filebeat Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants