Json is storing as string in es

here is what resolved my issue, hopefully will help you, im running LS 5.4 and this resolved the json codec not working.

bin/logstash-plugin update logstash-input-kafka

update your LS Kafka input plugin.

stop LS then run the above command.

BTW this may not work:

if [@metadata][type] == "my_app" {
       json {
               source => "message"
        }

check this topic: