Skip to main content
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.

Querying system information

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%'

Available information

The system:system_info collection tracks various categories of information organized by namespace.

SDK metadata

SDK version, commit hash, language, and platform information.
KeyNamespaceDescription
ditto_sdk_versioncoreSDK version number
ditto_sdk_commitcoreGit commit hash
ditto_sdk_languagecoreSDK language (Swift, Kotlin, JavaScript, etc.)
ditto_sdk_platformcoreOperating 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.
KeyNamespaceDescription
fs_device_availablecoreAvailable device storage in bytes
fs_device_totalcoreTotal device storage in bytes
fs_usage_storecoreStorage used by the document store
fs_usage_attachmentcoreStorage used by attachments
fs_usage_replicationcoreStorage used by replication metadata
fs_usage_authcoreStorage used by authentication data
fs_usage_totalcoreTotal 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.
KeyNamespaceDescription
non_default_system_parameter[<param>]coreAny 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.
KeyNamespaceDescription
collection_num_docs[<collection>]storeNumber 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.
KeyNamespaceDescription
local_subscriptions[<query>]replicationActive 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.
KeyNamespaceDescription
connections_bluetoothpresenceNumber of active Bluetooth connections
connections_lanpresenceNumber of active LAN connections
connections_p2pwifipresenceNumber of active P2P WiFi connections
connections_websocketpresenceNumber of active WebSocket connections
connections_accesspointpresenceNumber of active access point connections
is_connected_to_ditto_cloudpresenceWhether connected to Ditto Cloud
device_namepresenceDevice name

Logging configuration

Current logging settings.
KeyNamespaceDescription
enabledlogsWhether logging is enabled
minimum_levellogsMinimum log level (DEBUG, INFO, WARN, ERROR)

Tombstone reaper

Information about deleted document cleanup.
KeyNamespaceDescription
last_reap_timereaperTimestamp of last reaper execution
num_tombstones_reapedreaperNumber 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