Q) Why?
A) I wanted some method of exporting production metrics into InfluxDB so they could be visualised externally, I found a mod which did something like this (Statistic_1.0.1) however it hadn't been updated for a long time and it had some incompatible design decisions about output data formats.
Q) How?
A) however you like, I'm not intending its usage to be proscriptive. I am using it, combined with the Telegraf file input plugin. There is an example Telegraf config in the git repo if you want.
Q) Can you add X to the output statistics?
A) Yeah, if its available from the lua scripting interface.
Q) Why are you using "ticks_played" and "ticks_played_seconds" instead of real timestamps?
A) firstly because there isn't a way to get a system time from within factorio, secondly because repeatedly recording the duplicate (except for the "time" field in a database makes me sad.