-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
out_kinesis_streams: add custom port support for Kinesis output plugin #9317
Conversation
Testing
Documentation
|
@cosmo0920 Please, could you do a review. |
This patch adds the ability to set a custom port for the Kinesis Streams output plugin. It introduces a new configuration option 'Port' that allows users to specify a non-standard port when connecting to the Kinesis service. The implementation includes: - Using the port number set in the output instance's host structure - Falling back to the default HTTPS port (443) if no port is specified - Validating the port number to ensure it's within the valid range (1-65535) - Adding appropriate debug and error logging This feature is useful for scenarios involving proxies or custom network configurations. It has been tested with various port configurations, including the default, custom ports, and invalid inputs. Signed-off-by: Mikhail [azalio] Petrov <[email protected]>
This commit introduces three new test cases for the kinesis_streams output plugin: 1. flb_test_kinesis_default_port: Verifies that the plugin works correctly with the default port configuration. 2. flb_test_kinesis_custom_port: Ensures that the plugin can be configured to use a custom port (8443 in this case) and still function properly. 3. flb_test_kinesis_invalid_port: Checks that the plugin fails to start when an invalid port number (99999) is specified. These tests enhance the coverage of the kinesis_streams plugin by validating its behavior with different port configurations, including error handling for invalid inputs. Signed-off-by: Mikhail [azalio] Petrov <[email protected]>
82799d3
to
682776d
Compare
I kicked off the testing workflows. Waiting for the results. |
As I see it, all the checks have been successfully completed. Could you merge PR? |
I added |
This PR enhances the Kinesis output plugin by adding support for custom port configuration. The changes include:
Added a new configuration option 'port' to allow users to specify a custom port for Kinesis connections.
Modified the plugin initialization to use the custom port when specified, defaulting to the standard port (443) when not provided.
Updated the connection logic to utilize the custom port when establishing connections to Kinesis.
Added error handling to validate the port number, ensuring it's within a valid range (1-65535).
Updated documentation to reflect the new 'port' configuration option.
Added new unit tests to verify the functionality of the custom port feature:
These changes provide users with more flexibility in configuring their Kinesis output, especially in environments where non-standard ports are required.
The implementation maintains backwards compatibility, as the default behavior remains unchanged when no custom port is specified.
Closes #9160