-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support date_nanos in Kibana #31424
Comments
Pinging @elastic/kibana-app |
Kibana currently doesn't recognize Non utc timezones throw an error on discover because elasticsearch doesn't handle the timezone correctly: elastic/elasticsearch#39107 The discover view should support the display of nano seconds. Sorting in discover works correctly |
Possibly related: #30420 |
I've updated the description of the issue with the current state and especially a description why we can't support date_nanos completely since we're not Java, but JavaScript :-) |
Do we have some date_nanos testdata available, currently trying to convert our testdata to |
@kertal I am pretty sure we don't have yet. Since we want tests on that anyway, we most likely also need to create some esarchiver data for use in functional tests that contain |
@timroes I think we need 2 PRs for this:
|
I'll go forward and close this issue, since basic |
Thanks, that sounds like good news! Will it sort event timestamps correctly i.e. at the full nanosecond precision? That would cover 99% of my motivation for this request since I just need to break ties properly for log messages coming from a single process. |
@bmerry Yes, it will sort nanosecond timestamps stored in |
I've now installed Kibana 7.3 and created a fresh new ElasticStack environment on my dev machine for testing. I can now pick a
I'm using the docker.elastic.co/kibana/kibana-oss:7.3.0 Docker image. |
Ah, looks like my previous comment may be the same as #40699. |
This issue describes supporting the
date_nanos
type in Kibana.What we cannot do
We can't fully support
date_nanos
in Kibana, due to the technical limitations of JavaScript. JavaScript stores all numeric values in a 64bit floating point number. Thus we only can represent integer (non decimal numbers) to a precision of 52 bit (the mantisse in that floating point number). Every number above that, will just not be stored incorrectly trying to use them in JavaScript, see how I am trying to store and access the current timestamp in nanoseconds in my browser and as you can see the number in the variablex
is not the same as I tried to store in it:That means that even the current timestamp in nanoseconds cannot be stored in JavaScript properly (which is also the reason behind our general lack for 64bit integer support, see #1274), without being rounded a bit (usually you'll lose at least the nano second part). Also our date formatting library moment.js cannot and will never support formatting and parsing of nanoseconds (most likely due to the same constraints, that they are not representable in a JavaScript number.
What we can do
We can enable
date_nanos
treat them as date fields and just ignore everything smaller then milliseconds.This would mean:
date_nanos
field in index pattern as a date field (we might want to show a warning that you are not seeing exact values here).What needs to be done
After some checking and discussions with and through @flash1293 and @Bargs the following things need to be addressed to implement it:
date_nanos
type to the Kibanadate
type inkbn_field_types.js
stored_fields
andsort
so we need to check if we missed some usage of those.The text was updated successfully, but these errors were encountered: