Links

journey.diagnostics

Version compatibility
journey.diagnostics was introduced with version 4.37.0 of the JourneyApps Container.
Returns diagnostics information otherwise only available to the user via the context menu.
Available diagnostics:
Diagnostic
Property
Description
Example
getSyncStatus()
lastFullSync
Timestamp of the last full sync that was completed.
var syncStatus = journey.diagnostics.getSyncStatus(); syncStatus.lastFullSync // => Fri Jul 27 2018 17:07:56 GMT+0200 (South Africa Standard Time) syncStatus.lastFullSync.getTime() // => 1532704076000
attachmentQueue
Count and size of the attachment upload queue.
var syncStatus = journey.diagnostics.getSyncStatus(); attachmentQueue.size // => 174575 attachmentQueue.count // => 1
attachmentQueue.size
Total size in bytes of attachments to upload.
attachmentQueue.count
Number of attachments to be uploaded.
crudQueue
Size of the data upload queue.
var syncStatus = journey.diagnostics.getSyncStatus(); crudQueue.count // => 3
crudQueue.count
Number of operations in the upload queue.
crudQueue.size
Total size of object data in upload queue.
getStorageStats()
database
Stats for the main on-device object database. Not LocalDB or attachments.
database.dataSize
Total size in bytes of object data.
database.dataCount
Number of objects.
database.indexSize
Total size in bytes of all indexes.
database.indexCount
Number of index entries.
database.storageSize
Total size in bytes of the main database (excluding attachments).
all()
All available diagnostic information.
var diagnostics = journey.diagnostics.all(); var syncStatus = diagnostics.syncStatus; var storageStats = diagnostics.storageStats;