PostHog / posthog-java

Official PostHog java library
MIT License
8 stars 12 forks source link

Allow timestamp to be set on `capture` #52

Open kdrakon opened 7 months ago

kdrakon commented 7 months ago

This refactors the existing capture methods to allow the caller to specify the timestamp on the JSON payload. This allows the SDK to perform similar to the Python SDK, in that the events being posted can be set with a contextual timestamp.

At my company, we currently use the Python SDK, but are building another application in Java. We require the ability to specify the event timestamp because we read some of our events of a queue, which can add a degree of latency before being sent to Posthog.

This likely addresses some of the changes requested in #41.