Skip to content

v0.4.11

Latest

Choose a tag to compare

@DZQOX DZQOX released this 23 Aug 03:07
d3d130a

Highlights

Fixes ZonedDateTime serialization breaking recording (#624)

Jackson is the default serializer of the agent, and it threw InvalidDefinitionException ("Java 8 date/time type java.time.ZonedDateTime not supported by default") for every response containing a ZonedDateTime, so those cases could not be recorded at all. Gson had no adapter either and fell back to reflection, writing the internal fields of ZonedDateTime (dateTime/offset/zone) instead of a readable time string.

This release adds a ZonedDateTime adapter for both serializers, as the other java.time types already have, without introducing the jackson-datatype-jsr310 dependency:

  • The zone id is kept in the serialized value (2020-06-09T09:00:00.000+08:00[Asia/Shanghai]), so the deserialized value keeps the original zone instead of degrading to a fixed offset, and the offset still disambiguates the local time repeated in a DST overlap.
  • Nanosecond precision on JDK 11+, same as LocalDateTime.

If your responses contain ZonedDateTime fields and recording was missing, upgrading to this version is recommended.

What's Changed

🐞 Bug fixes

  • fix: support java.time.ZonedDateTime serialize/deserialize by @DZQOX in #624

Full Changelog: v0.4.10...v0.4.11