snowplow / snowplow-java-tracker

Snowplow event tracker for Java. Add analytics to your Java desktop and server apps, servlets and games. (See also: snowplow-android-tracker)
http://snowplowanalytics.com
Apache License 2.0
23 stars 36 forks source link

Add support for serializing Java 8 datetime objects #378

Closed matus-tomlein closed 6 months ago

matus-tomlein commented 7 months ago

Is your feature request related to a problem? Please describe. Currently the tracker fails (silently) with this message in the logs when Java 8 datetime objects are used in the event or entity body:

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.LocalDateTime` not supported by default: add Module “com.fasterxml.jackson.datatype:jackson-datatype-jsr310” to enable handling (through reference chain: java.util.LinkedHashMap[“data”]->java.util.LinkedHashMap[“data”]->java.util.HashMap[“eventTimestamp”])

Describe the solution you'd like Be able to serialize the objects using the date-time JSON schema format.