emsearcy / fluent-plugin-gelf

Buffered fluentd output plugin to GELF (Graylog2)
Apache License 2.0
33 stars 57 forks source link

Support nsec in Fluent::EventTime (was #18) #20

Closed gcs-github closed 7 years ago

gcs-github commented 7 years ago

Replacement of #18 so that I can use my own master branch ;)

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 . and to keep supporting fluentd 0.12 which does not have the Fluent::EventTime type.