getditto / DittoSwiftTools

Diagnostic and Debugging Tools for DittoSwift
MIT License
9 stars 2 forks source link

Allow heartbeat tool to not publish to collection if users want to only utilize the custom callbacks. #117

Closed bplattenburg closed 6 months ago

bplattenburg commented 6 months ago

Some customers may want to customize the tool so that it doesn't publish the heartbeat data as a Ditto collection, but instead pipe that data via a custom callback to somewhere else.

This adds a new configuration flag publishToDittoCollection which defaults to true.

Closes #113

rajramsaroop commented 6 months ago

Is this saying that users can either publish to the heartbeat collection OR do something else with a custom callback? But not both?

bplattenburg commented 6 months ago

Left a comment.

Is the callback implemented in another ticket/story?

The callback is already implemented as both a Combine publisher and a closure that are triggered if setup (skipped if not, so "opt-in" behavior), but there is currently no way to opt out of also sending the data via a Ditto collection.