Fluentd 0.14 introduced the Fluent::EventTime type to add nanosecond precision to fluentd messages, with the fields sec, representing the good old UNIX integer timestamps, and nsec, representing the nanoseconds to add on top of the regular UNIX timestamp.
The current GELF specification only supports milliseconds though, so we have to do some gymnastic to output a timestamp in GELF's float format of <integer_timestamp>.<milliseconds> and to keep supporting fluentd 0.12 which does not have the Fluent::EventTime type.
Fluentd 0.14 introduced the Fluent::EventTime type to add nanosecond precision to fluentd messages, with the fields
sec
, representing the good old UNIX integer timestamps, andnsec
, representing the nanoseconds to add on top of the regular UNIX timestamp.The current GELF specification only supports milliseconds though, so we have to do some gymnastic to output a timestamp in GELF's float format of
<integer_timestamp>.<milliseconds>
and to keep supporting fluentd 0.12 which does not have the Fluent::EventTime type.