logstash-plugins / logstash-output-elasticsearch

https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html
Apache License 2.0
216 stars 306 forks source link

When datastream is enabled then no version related attributes fills into document actions #1161

Closed andsel closed 8 months ago

andsel commented 8 months ago

Release notes

Avoid to populate version and version type attributes when processing integration metadata and datastream is enabled

What does this PR do?

During PR #1155 the resolution of version and version_type ES parameters was moved from the index only event action tuple creation to the common method. This changed was due to do the intent to collect all integration-aware metadata fields in one place, but the common method is used also by the datastream part this result in populating event and event_type request parameters not only for normal index operations. During an index operation on a datastream, if one of those parameters is valued, generated an error on ES indexing, resulting in request fail.

This PR move the processing and creation of event and event_type parameters, back in its original position, splitting the capture of integration metadata in 2 parts.

Why is it important/What is the impact to the user?

It's a bugfix that let the plugin to work properly on datastreams.

Checklist

Author's Checklist

How to test this PR locally

Follow the same plan as described in PR #1155

Related issues