Metric output includes nanoseconds, doesn't allow for TZ adjustment
Basics
Logistics
Basics
Logistics
Description
The switch to Java 8 times causes nanosecond outputs in the metrics, and I traced this to the fact that the Java 8 time module for Jackson really doesn't honor any of the original Jackson features for formatting and doesn't even allow for a custom formatter at all.
We also probably need to align the time zone handling to match the audit logging since I'm reusing the Audit formatting string if it's found, and that was meant to be potentially a non-UTC capable string.
Environment
None
Activity
Scott Cantor
December 30, 2020 at 4:56 PM
I additionally found a setting that does toggle Jackson over to writing Durations as ISO strings. We don't have any other real formatting support for Duration so I left it defaulted but the Instant serialization is now replaced by a custom class that honors the existing beans for auditing.
Tested with local time, non-local time, and verified nanoseconds can be removed with a formatter.
The switch to Java 8 times causes nanosecond outputs in the metrics, and I traced this to the fact that the Java 8 time module for Jackson really doesn't honor any of the original Jackson features for formatting and doesn't even allow for a custom formatter at all.
We also probably need to align the time zone handling to match the audit logging since I'm reusing the Audit formatting string if it's found, and that was meant to be potentially a non-UTC capable string.