Skip to content
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 microsecond time precision #1305

Open
planetjones opened this issue Aug 26, 2020 · 0 comments
Open

Support microsecond time precision #1305

planetjones opened this issue Aug 26, 2020 · 0 comments

Comments

@planetjones
Copy link

@planetjones planetjones commented Aug 26, 2020

When ordering logs from a single instance by time the logs can appear out of order. The cause I think is because of the Java 8 support in:

So only millisecond precision is supported in SimpleDateFormat, meaning we get many log entries with the same timestamp.

With Java 9 onwards Instant.now() would have the microsecond prevision we crave. It would go from a frequent issue, to a very rare issue when using microseconds I believe.

Given the widespread usage of JDKs >= 9, I would hope microsecond support could be added (even if enabled by a system property or something). The underlying application insights platform supports microsecond precision as far as I know.

In lieu of such microsecond precision I have been unable to find a simple "out of the box" solution for ordering logs generated by Java applications. Do you have a solution, or should we add a customDimension like running number to include in the order criteria ? Or do you have any other suggestions (maybe I miss a bigger picture here and we are doing something fundamentally wrong)

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.