Ditto provides a read-only system collection system:system_info that exposes diagnostic and observability data about your Ditto instance. This collection logs key-value pairs with timestamps, allowing you to query runtime information, configuration, and performance metrics.
The system:system_info collection is available in Ditto SDK version 4.13.0 and later.
Observers registered against system:system_info execute every 500ms regardless of whether data has changed. Consider the performance implications before registering observers on system collections, especially on resource-constrained devices.
Query the collection using standard DQL:
SELECT * FROM system:system_info
You can filter by specific keys or namespaces:
SELECT * FROM system:system_info
WHERE key LIKE 'collection_num_docs%'
The system:system_info collection tracks various categories of information organized by namespace.
SDK version, commit hash, language, and platform information.
| Key | Namespace | Description |
|---|
ditto_sdk_version | core | SDK version number |
ditto_sdk_commit | core | Git commit hash |
ditto_sdk_language | core | SDK language (Swift, Kotlin, JavaScript, etc.) |
ditto_sdk_platform | core | Operating system platform |
Example response:
{
"key": "ditto_sdk_version",
"namespace": "core",
"timestamp": 1762469332,
"value": "4.13.0"
}
Filesystem metrics
Total device storage and available space, plus storage usage broken down by component.
| Key | Namespace | Description |
|---|
fs_device_available | core | Available device storage in bytes |
fs_device_total | core | Total device storage in bytes |
fs_usage_store | core | Storage used by the document store |
fs_usage_attachment | core | Storage used by attachments |
fs_usage_replication | core | Storage used by replication metadata |
fs_usage_auth | core | Storage used by authentication data |
fs_usage_total | core | Total storage used by Ditto |
Transport configuration
Complete snapshot of enabled transports and their settings.
{
"key": "transport_config",
"namespace": "core",
"timestamp": 1762468011,
"value": {
"peer_to_peer": {
"bluetooth_le": { "enabled": true },
"lan": { "enabled": true, "mdns_enabled": true }
}
}
}
System parameters
Non-default configuration parameters and collection sync scopes.
| Key | Namespace | Description |
|---|
non_default_system_parameter[<param>] | core | Any system parameter set to a non-default value |
Example:
{
"key": "non_default_system_parameter[user_collection_sync_scopes]",
"namespace": "core",
"timestamp": 1762468011,
"value": {
"local_orders": "LocalPeerOnly",
"shared_data": "AllPeers"
}
}
Store metrics
Document counts per collection.
| Key | Namespace | Description |
|---|
collection_num_docs[<collection>] | store | Number of documents in the specified collection |
Example:
{
"key": "collection_num_docs[orders]",
"namespace": "store",
"timestamp": 1762469342,
"value": 5030
}
Active subscriptions
Local observer subscriptions currently registered.
| Key | Namespace | Description |
|---|
local_subscriptions[<query>] | replication | Active subscription query |
Example:
{
"key": "local_subscriptions[SELECT * FROM orders]",
"namespace": "replication",
"timestamp": 1762469332,
"value": null
}
Connectivity
Active peer connections by transport type and cloud connection status.
| Key | Namespace | Description |
|---|
connections_bluetooth | presence | Number of active Bluetooth connections |
connections_lan | presence | Number of active LAN connections |
connections_p2pwifi | presence | Number of active P2P WiFi connections |
connections_websocket | presence | Number of active WebSocket connections |
connections_accesspoint | presence | Number of active access point connections |
is_connected_to_ditto_cloud | presence | Whether connected to Ditto Cloud |
device_name | presence | Device name |
Logging configuration
Current logging settings.
| Key | Namespace | Description |
|---|
enabled | logs | Whether logging is enabled |
minimum_level | logs | Minimum log level (DEBUG, INFO, WARN, ERROR) |
Tombstone reaper
Information about deleted document cleanup.
| Key | Namespace | Description |
|---|
last_reap_time | reaper | Timestamp of last reaper execution |
num_tombstones_reaped | reaper | Number of tombstones cleaned up |
Use cases
The system:system_info collection is useful for:
- Debugging: Understand your Ditto instance configuration at runtime
- Monitoring storage usage: Track disk space consumption by component
- Verifying configuration: Confirm transport settings and system parameters
- Observability: Monitor connection counts and sync status
- Diagnostics: Gather information for troubleshooting issues