Key recommendations for ensuring your deployment is ready for production
connected
- Boolean; True if the client is connected to the PowerSync Service instance. False if not.connecting
- Boolean; True if the client is attempting to connect to the PowerSync Service instance. False if not.uploading
- Boolean; If the client has a network connection and changes in the upload queue are present this will be set to true when the client attempts to upload changes to the backend API in the uploadData
function. This option can be found on the dataFlowStatus
object.downloading
- Boolean; If the client is connected to the PowerSync Service and new data is available, this will be set to true, else it will be false. This option can be found on the dataFlowStatus
object.hasSynced
- Boolean; True if the client completed a full sync at least once. False if the client never completed a full sync.lastSyncedAt
- DateTime; Timestamp of when the client last completed a full sync.SyncStatus
class that can be used to access the fields mentioned above.
In addition to the SyncStatus
options above, it’s also a good idea to see what the current length of the upload queue looks like.
The upload queue contains all local mutations that need to be processed by the client specific uploadData
implementation.
To get this information you can simply count the number of rows present in the internal ps_crud
SQLite table e.g.
Replication issues
. For details instructions on how to configure Issue Alerts, see the Issue Alerts section of the Monitoring and Alerting docs.
Here’s quick example of what the Issue alert should look like to catch replication issues: