Undefined method `sanitized'

This error is due to a security permissions problem with the user configured in the output. The error message displayed is obviously a mistake, and has been fixed in version 7.4.2 of the output plugin:

$ bin/logstash-plugin update logstash-output-elasticsearch
Updating logstash-output-elasticsearch
Updated logstash-output-elasticsearch 7.4.1 to 7.4.2

Now you should receive a sane error,

[2017-09-22T10:43:56,826][ERROR][logstash.outputs.elasticsearch] Encountered a retryable error. Will Retry with exponential backoff  {:code=>403, :url=>"http://127.0.0.1:9200/_bulk"}

, which indicates that the user does not have permission to index data. In order to create a dedicated logstash write user, see this guide, or use the elastic superuser while testing.