class LogStash::Inputs::BeatsSupport::EventTransformCommon

for backward compatibility.
apply the tags and make sure we copy the beat hostname into ‘host`
Base Transform class, expose the plugin decorate method,

def codec_name

def codec_name
  @codec_name ||= if @input.codec.respond_to?(:base_codec)
                    @input.codec.base_codec.class.config_name
                  else
                    @input.codec.class.config_name
                  end
end

def copy_beat_hostname(event)

the host field is already defined
Copies the beat.hostname field into the host field unless
def copy_beat_hostname(event)
  host = event.get("[beat][hostname]")
  if host && event.get("host").nil?
    event.set("host", host)
  end
end

def decorate(event)

based workflow.
plugin know the data used to decorate. This would allow a more component
`Decorator` object that we can pass to other objects, since only the
I think the correct behavior would be to allow the plugin to return a

can let you do all the wrong thing.
class, the method is protected and we cannot access it, but well ruby
This break the `#decorate` method visibility of the plugin base
def decorate(event)
  @input.send(:decorate, event)
end

def initialize(input)

def initialize(input)
  @input = input
  @logger = input.logger
end

def transform(event)

def transform(event)
  copy_beat_hostname(event)
  decorate(event)
  event
end