{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/logstash/issues/4565","repository_url":"https://api.github.com/repos/elastic/logstash","labels_url":"https://api.github.com/repos/elastic/logstash/issues/4565/labels{/name}","comments_url":"https://api.github.com/repos/elastic/logstash/issues/4565/comments","events_url":"https://api.github.com/repos/elastic/logstash/issues/4565/events","html_url":"https://github.com/elastic/logstash/issues/4565","id":128692205,"number":4565,"title":"Timestamp loses precision when parsed from a JSON","user":{"login":"alex88","id":436888,"avatar_url":"https://avatars.githubusercontent.com/u/436888?v=3","gravatar_id":"","url":"https://api.github.com/users/alex88","html_url":"https://github.com/alex88","followers_url":"https://api.github.com/users/alex88/followers","following_url":"https://api.github.com/users/alex88/following{/other_user}","gists_url":"https://api.github.com/users/alex88/gists{/gist_id}","starred_url":"https://api.github.com/users/alex88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex88/subscriptions","organizations_url":"https://api.github.com/users/alex88/orgs","repos_url":"https://api.github.com/users/alex88/repos","events_url":"https://api.github.com/users/alex88/events{/privacy}","received_events_url":"https://api.github.com/users/alex88/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/logstash/labels/bug","name":"bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2016-01-26T01:30:19Z","updated_at":"2016-03-17T17:25:37Z","closed_at":"2016-03-17T17:25:37Z","body":"I was trying to figure out why the GELF input wasn't showing milliseconds in kibana, turns out to be mainly a jRuby bug which I opened here https://github.com/jruby/jruby/issues/3616\r\n\r\nBasically the gelf input plugin parses the JSON using `LogStash::Json.load` [here](https://github.com/logstash-plugins/logstash-input-gelf/blob/master/lib/logstash/inputs/gelf.rb#L107) and later it creates the timestamp value with `LogStash::Timestamp.at(event[\"timestamp\"])`.\r\n\r\nThe real problem happens [here](https://github.com/elastic/logstash/blob/v2.1.1/lib/logstash/timestamp.rb#L26-L28), basically when `Time.at` is called with a BigDecimal (which LogStash::Json.load provides) the milliseconds are stripped.\r\n\r\nCould it be worth to handle the case when it's a BigDecimal and call `to_f` on it? If so I can work on a PR.\r\nSince you stil bundle an older jRuby version and maybe it's easier to handle the problem with a patch instead of waiting for a new jRuby release that you should also globally upgrade."}}