Writing a codec plugin for logstash 1.4.2

Which documentation should we be following for writing a codec plugin for logstash 1.4.2?

Writing your own plugin

or

How to write a logstash codec plugin

Still having some issues with configuring the codec plugin to work in logstash 1.4.2.