Skip to content

Conversation

@jmccormick7
Copy link

This PR adds event_type to the flb_plugin_proxy_def struct. This allows for the setting of event_type to a value other than the default log only initialization.

This PR is a backport for FluentBit 4.2 that matches the approved changes in PR #11011

In the flb_plugin_proxy_register function default behavior is enforced by checking for unset event_type values. When unset (a value of 0) then log behavior is defaulted. No need for incorrect value checking since this was not a set field in the past. Unset fields are set as current behavior dictates and future use cases using incorrect values can be treated as user error.

Input use case does not use event-type and is unaffected by this change.

Addresses #10995

This corresponding PR in the fluent-bit-go library enables the ability to allow Go plugins to register their event types fluent/fluent-bit-go#80


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • [ x] Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

… malloc

Changing intialization to use calloc instead of malloc so that emtpy fields are 0 initialized.
Specifically for the event_type addition.

Signed-off-by: jmccormick7 <[email protected]>
This commit adds a runtime shell test for the go plugin interface.
A dummy go output plugin is added to the directories, and a test that builds
the plugin shared object and then tests that it works and writes the output.
This test ensures that the go proxy interface is working as expected.

This was tested in the devcontainer using ctest.

Signed-off-by: jmccormick7 <[email protected]>
This commit makes the go proxy a test that only runs on Linux
using the CMAKE_SYSTEM_NAME. It also removes an autogenerated
header file from the go compile that should not have been commited.

Signed-off-by: jmccormick7 <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Dec 2, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant