Navigation

Sync Logs

Overview

MongoDB Realm creates sync logs whenever a user interacts with Sync. This includes writing data to MongoDB Realm from clients, reading changes from MongoDB Realm to clients, and starting or ending a connection.

Connections

Every user communicates with MongoDB Realm using a connection. Each connection uses a single websocket to push and pull information to and from a single user. Logging in a user using any authentication provider starts a connection. Logging out that user ends the connection.

Sessions

Users download and upload changes to a single MongoDB Realm partition using a session. Instantiating a local instance of a synced realm starts a session. Destroying that realm object ends the session.

MongoDB Atlas Sync Events

Every sync event is associated with a user identity that tells you exactly which user caused the event to occur. However, you may notice some sync events that aren’t associated with any specific user. These events include downloaded changes from all clients on all partitions as well as uploaded changes to data from MongoDB Atlas. Any sync event that does not include a user ID is part of the MongoDB Atlas data synchronization process. You may see a large number of MongoDB Atlas synchronization events when you initialize sync if your cluster already contains a large amount of data.

Fields

Field Description
Logs Debugging information about the operation. Includes the schema version on client and server, the number of changes, and whether or not conflict resolution was required in order to incorporate the operation into the server’s copy of the data.
Partition Which partition changed as a result of the operation.
Write Summary

Includes information about the data that changed, such as:

  • The type or table of data that changed.
  • The operation used to change data: insertion, deletion, update, or replace.
  • The primary key of the data that changed.
SDK

The SDK used to send the request. Potential values include any SDK. For a browser, this is <browser> <SDK version>.

Example

This request came from the Realm Web SDK version 4.0.0 running on Mozilla Firefox:

SDK: firefox v4.0.0

This request came from the Realm Android SDK version 4.6.0 running on Android Marshmallow:

SDK: android v4.6.0
Platform Version The version of the platform that sent the request.