Open wiibaa opened 9 years ago
the only way I see this done is by changing the api to add events to the queue (usually queue << event
)
to a method like publish(event)
that does:
def publish(event)
decorate(event)
@queue << event
end
that said we're planning some changes on the pipeline and queue persistence which will likely change this behaviour. So until then let's keep this open but table this.
Currently all input plugins contains more or less the following lines
decorate is handling the add_field/add_tag and with #2390 it could use sprintf syntax and already manipulate event fields set by the input plugin, so it should be enforced that decorate() is called after the event is filled by the specific input.
The idea would be to DRY this into inputs/base.rb, it would avoid plugin implementor to forget or misplace the call to decorate()
Thoughts ?
Here is the list of inputs not complying with the proposed rule