elastic / logstash-filter-elastic_integration

The Elastic Integrations filter for Logstash, which enables running Elastic Integrations inside of Logstash pipelines
Other
2 stars 9 forks source link

Add Elastic-Api-Version header to rest client #84

Closed kaisecheng closed 1 year ago

kaisecheng commented 1 year ago

This commit adds a request GET / in register phase to check if it is a serverless Elasticsearch. If so, recreate the rest client with the default header "Elastic-Api-Version".

kaisecheng commented 1 year ago

~blocked by https://github.com/elastic/logstash-filter-elastic_integration/issues/85~ confirmed rebase to Resync with Elasticsearch 8.9 solved the build issue

kaisecheng commented 1 year ago

I wish I could send the header regardless of stateful or stateless. The behavior of ES handling version header in stateful is undefined. It could be anything and we just don't know atm. The implementation is defensive for all plugins