logstash-plugins/logstash-codec-fluent

Milliseconds in timestamp is not preserved when setting nanosecond_precision as true

sivaram-vu opened this issue · 0 comments

Logstash version: docker image - logstash:8.6.2

input {
    tcp {
        codec => fluent {
          nanosecond_precision => true
        }
        port => 4000
    }

  #  http {
  #      codec => fluent
  #      port => 4000
  #  }

}

output {
  stdout { codec => json }
  stdout { codec => rubydebug }
}

When fluend message has timestamp with Nano second precision like "2023-05-09T09:39:45.724585Z", This plugin is preserving the nano seconds and printing the timestamp correctly with nano seconds.

When fluend message has timestamp with Milli second precision like "2023-05-09T09:39:45.724Z", This plugin is not preserving the Milli seconds and printing the timestamp as "2023-05-09T09:39:45.000Z".