Uploaded image for project: 'logstash'
  1. LOGSTASH-1132

event_v1 to_json/from_json timestamp mangling

    Details

    • Type: Bug/Feature
    • Status: Resolved (View workflow)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Labels:
      None

      Description

      Two problems handling timestamps in event_v1.rb...

      First, when serializing an event to json, the monkey patched Time.to_json method (event_v1.rb:9-14) is not used at all. This causes the resulting json to lose sub-second precision.

      Second, when unserializing and event from json, the @timestamp field is not parsed into a Time object, but left as a string. Logstash expects to find a time object there, so this causes exceptions down the line (for example in stdout output or anywhere %{+format} is used).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                logstash-dev Logstash Developers (Inactive)
                Reporter:
                semiosis louis z
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: