elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
14.28k stars 3.51k forks source link

Use Java 8 Time instead of Joda in LS and any plugins. #7149

Open guyboertje opened 7 years ago

guyboertje commented 7 years ago
suyograo commented 7 years ago

@guyboertje Is this going to break the interface for users w.r.t. the matcher patterns? I don't think Joda and Java 8 formatting of date patterns are compatible, no? I might be wrong though, haven't dug deep.

http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html

suyograo commented 7 years ago

/cc @jordansissel who was researching this as well..

ph commented 7 years ago

@suyograo We might be able to create a translation layer between the 2, making it transparent to the user.

ph commented 7 years ago

From a discussion on zoom between @suyograo @jordansissel and myself we agreed to the following:

colinsurprenant commented 7 years ago

So would it be possible to keep Joda just for the pattern matching part and use Java 8 time everywhere else?? If it is, this would allow moving forward with proper Java 8 support and just keep Joda for the pattern matching until we decide what to do with that?

ph commented 7 years ago

@colinsurprenant Yup, I think possible to do that, we could use it the date filter and in the StringInterpolation classes.

jordansissel commented 7 years ago

possible to keep Joda just for the pattern matching part

This may not be necessary since java.time (JSR310) is based on Joda and hopefully has the same date format stuff.

colinsurprenant commented 7 years ago

are we moving forward with this?

jordansissel commented 7 years ago

@colinsurprenant yes, but we haven't done any compatibility research, testing, or code yet.

If you'd like to work on this, I am in favor of it being delivered. I think it's two things:

1) Update Logstash::Timestamp to be based on java.time.Instant (or whatever is appropriate) 2) Update Date filter to use java.time's parser library

colinsurprenant commented 7 years ago

my own backlog is long but If we believe this is important then we can look into prioritizing it somehow. I asked if we were moving forward more to know if this was still valid or not and it is per your comment @jordansissel.

jordansissel commented 7 years ago

Indeed. Long is the backlog ;)

I am +1 on moving forward with this whenever/wherever we can fit it into our roadmap and whatnot.

ahrex commented 4 years ago

Hello!

I got here by way of #7463, #7474, and https://github.com/elastic/logstash/issues/5606#issuecomment-302221341, and was wondering if there's any progress / prioritization for switching underlying time libraries!

We're using Logstash for an application that would greatly benefit from nanosecond granularity, and it would be nice to know what the plan is for switching over.

Thanks!

roaksoax commented 4 years ago

Hi @ahrex ,

Benefiting from Nanosecond granularity is currently on our roadmap, but unfortunately, it is not something we will be able to tackle in the short term. That said, we are constantly evaluating the roadmap and hoping to have better news in 3-6 months as to when we would be able to improve here!

benbuzbee commented 3 years ago

That said, we are constantly evaluating the roadmap and hoping to have better news in 3-6 months as

Just checking in 😁