semantic_logger icon indicating copy to clipboard operation
semantic_logger copied to clipboard

Elasticsearch Specifying types in bulk requests is deprecated

Open xuwupeng2000 opened this issue 2 years ago • 2 comments

Environment

Provide at least:

  • Ruby Version: 3.1.2
  • Semantic Logger Version: 4.11.0
  • Application/framework names and versions: Rails 7.0.3
  • Rails Semantic Logger Version: rails_semantic_logger: 4.10.0

Expected Behavior

Actual Behavior

config.semantic_logger.add_appender(appender: :elasticsearch, url: "http://localhost:9200")

configure the logger to forward log to elasticsearch and get this in console:

^Cwarning: 299 Elasticsearch-7.14.2-6bc13727ce758c0e943c3c21653b3da82f627f75 "[types removal] Specifying types in bulk requests is deprecated."

Clearly, there is method used has been deprecated for ES7. ES7 doesn't support bulk requests with type.

xuwupeng2000 avatar Aug 10 '22 03:08 xuwupeng2000

Just report this one to see if anyone has the same issue. I will come back and provide a fix.

xuwupeng2000 avatar Aug 10 '22 03:08 xuwupeng2000

Yes this was raised in #167 but issue was closed, there is a work around but setting type must be removed if you want to use ES 8.X

shaunbugler avatar Aug 23 '22 11:08 shaunbugler

Anyone want to submit a Pull Request to fix the ES appender so that it is compatible with both the older and latest ES?

reidmorrison avatar Oct 30 '22 18:10 reidmorrison

New gem published with the merged PR.

reidmorrison avatar Nov 09 '23 03:11 reidmorrison