-
Notifications
You must be signed in to change notification settings - Fork 32
feat: Custom App Metadata #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
simolus3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API changes and native implementation look good to me. On the web, we would also have to serialize appMetadata so that it reaches the sync worker.
The StartSynchronization extension type in sync_worker_protocol is the relevant message for that, I think serializing to JSON might be the simplest approach which is also what we do for the schema and sync parameters.
In the worker, we'd have to pass this through _ConnectedClient -> referenceSyncTask -> _AddConnection -> _SyncRunner future (what a quest, I should probably look into simplifying that at some point).
simolus3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!

This is the Dart port of
powersync-ja/powersync-js#783
This allows clients to specify application metadata when calling powerSync.connect. This Record of String values is logged in the PowerSync service logs, which can be used for debugging and analytics. For context: powersync-ja/powersync-service#413