Skip to content

Conversation

@mashhurs
Copy link
Contributor

@mashhurs mashhurs commented Mar 4, 2025

Adds elastic-transport client support where opens LS-core a way to start using newer ES ruby client.

FYI: Failed Test plugin docs CI is not related to this change.

test_connection!
setup_serverless
if get_client.es_transport_client_type == "elasticsearch_transport"
require_relative "elasticsearch/patches/_elasticsearch_transport_http_manticore"
Copy link
Contributor Author

@mashhurs mashhurs Mar 4, 2025

Choose a reason for hiding this comment

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

review note: _elasticsearch_transport_http_manticore sets user-agent and accept-encoding headers for the es-transport-client versions between 7.2 and 7.16. It seems to me we can remove this but I have kept so far as there are active 7.x users.
(I don't know which LS versions included >7.2 and <7.16 es-transport-client)

@mashhurs mashhurs requested a review from jsvd March 6, 2025 20:00
@mashhurs mashhurs mentioned this pull request Mar 10, 2025
Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

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

same comments as the input plugin PR, lets document in code why we need this load+retry, and also be more explicit about the es ruby version the plugin is known to work with (7 + 8)

… add comments on the logics to support both elastic and elasticsearch transport gems.
@mashhurs mashhurs force-pushed the support-elastic-transport-client branch from b5371ac to d6e26ea Compare March 11, 2025 20:09
@mashhurs mashhurs requested a review from jsvd March 11, 2025 20:31
Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

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

LGTM

@mashhurs mashhurs merged commit ef2f5ec into logstash-plugins:main Mar 17, 2025
2 of 3 checks passed
@mashhurs mashhurs deleted the support-elastic-transport-client branch March 17, 2025 03:57
mashhurs added a commit to mashhurs/logstash-filter-elasticsearch that referenced this pull request Mar 17, 2025
mashhurs added a commit to mashhurs/logstash-filter-elasticsearch that referenced this pull request Mar 17, 2025
…-transport-client

Adds elastic-transport client support

(cherry picked from commit ef2f5ec)
mashhurs added a commit to mashhurs/logstash-filter-elasticsearch that referenced this pull request Mar 17, 2025
mashhurs added a commit that referenced this pull request Mar 17, 2025
Fix the unit test cases caused by #191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate logstash-filter-elasticsearch to elasticsearch-ruby 8.x

2 participants