Capturing Small Peer Information
This article provides instructions on how to enable the smallPeerInfo feature in your app, as well as how to view the collected metrics and download device logs:
With the smallPeerInfo feature, you can gather and store peer-to-peer sync and network details automatically rather than needing to continuously query Ditto for this data.
Once enabled, you can access the following details for each Small Peer device in the portal:
- Mesh network connection status
- Timestamp when last seen by the Big Peer cloud deployment
- Names and unique identifiers
- Platform
- Address peer key
- Latest device logs
The smallPeerInfo feature is available in Ditto SDK version 4.4.0 and later. For instructions on how to install the latest version of Ditto, see the SDK Guides for your development language.
To enable smallPeerInfo collection, after your transport configurations and before calling startSync():
If not already configured, explicitly request debug logging in your app. For instructions, see the Troubleshooting Guide > Setting the Logs to Debug.
Setting the minimum logging level to 'verbose' leads to constant logging of a significant amount of data, which can severely degrade mesh performance.
Therefore, unless specifically instructed by Ditto support engineers, avoid setting your logging level to 'verbose'.
If you're developing for cross-platform compatibility or specifically targeting iOS and want the ability to uniquely identify Small Peer devices in Ditto, call the deviceName property on the ditto namespace and specify the name you want.
iOS restricts third-party developers from accessing the device name set by the end user in the iOS Settings app and instead substitutes it with the "iPhone" device name.
So unless configured before initiating the sync process, the Data Browser displays "iPhone" as the name for each device.
Call smallPeerInfo.isEnabled set to true :
Specify that the collected information is to be sent and stored only on the Big Peer by setting the sync scope as follows:
By default, if you do not explicitly set the sync scope to "Big Peer only," Ditto defaults to "Local Peer Only."
As a result, collected information fails to sync beyond local devices, and, therefore, metrics are unavailable from the portal.
The ability to sync Small Peer information directly between Small Peers is currently unavailable; however, functionality is planned for future release. For more information, contact Ditto.
The details collected are available from the Data Browser within the portal.
To access the Data Browser and DQL Editor, log in to the portal > select your app > click Collections > and then click Data browser located on the right.
From the Data Browser:
Click to deselect Hide Internal.
Click __small_peer_info.
Interact with details that appear for each Small Peer device.