keenlabs / KeenClient-Java

Official Java client for the Keen IO API. Build analytics features directly into your Java apps.
https://keen.io/docs
MIT License
74 stars 43 forks source link

Add dryrun for debug test apps #44

Closed joninvski closed 7 years ago

joninvski commented 9 years ago

Similar to google analytics library for android where the tracker has a dry run mode where all code runs except the part where the event is sent to the server.

This is useful for debugging calls without polluting recorded data.

Signed-off-by: Joao Trindade trindade.joao@gmail.com

Geeber commented 9 years ago

Hi, thanks for submitting this and sorry for the delayed response! This is a good idea but I'd like to make sure that it's working across all scenarios before merging it. As written, I believe this will not apply to queueEvent/sendQueuedEvents. Perhaps it would be better to move the isDryRun test down into publishObject, which is the single point for all network operations. It looks like just returning null from that method will result in both addEvent and sendQueuedEvents returning success. This would also exercise more of the library code, making it a better test of whether things are wired together and working properly.

What do you think? Would you like to make that change, or do you want us to pick this up? I should be honest and say that we don't have a ton of cycles dedicated to this SDK at the moment, but we should be able to get to it before too terribly long :)

josephwegner commented 7 years ago

Unfortunately, I'm gonna close this. It's been sitting for 2 years.