Client Storage
<!-- status: beta language: browser, react-native, ios, android, flutter -->
Client storage (browser and mobile embedded stores)
The browser and mobile SDKs time on-device storage and report the operations that are slow or that fail. A slow local query is a common cause of jank that network tracing never shows. Statement text, parameters and error messages are never sent. Each operation is summarised as <operation> <first table> (SELECT users), using the same rules as the Node SDK.
What is sent
Slow or failed operation. Browser and mobile RUM send a
dbevent. Flutter sends an OTLP span. The value is the duration in ms. Attributes:db.system.name,db.operation.name,db.query.summary,db.collection.name,db.namespaceanderror.type(an error class or code, never the message).Thresholds. Async work is reported at or over
slowMs(100 ms by default). Synchronous work on the UI thread is reported over one frame (16 ms) and flaggeddb.main_thread: true. The UI thread is the browser main thread, the iOS or Android main thread, the React Native JS thread, or the Flutter root isolate.Sizes. These are
storageevents (Flutter: a log record withevent.name):wt.embedded.file_size, the store or file size in bytes, bydb.system.nameanddb.namespacewt.embedded.wal_sizebrowser only:
wt.embedded.storage.usage, the origin's usage, withstorage.quotaandstorage.persisted. A store that is not persisted can be evicted by the browser.
The datastore entity is {db.system.name, db.namespace, service}.
Per SDK
SDK | Automatic or wrapped |
|
|---|---|---|
Browser |
|
|
React Native |
|
|
iOS |
|
|
Android |
|
|
Flutter |
| your choice |
Limits
sql.js prepared statements (
prepare+step) are not timed.The iOS SQLite hook replaces any
sqlite3_trace_v2callback already set (GRDBdb.traceincluded). Profile events carry no error codes.Browser storage eviction is not detected directly. Use
storage.persistedand the trend in quota usage.There are no per-operation counts or throughput: only slow or failed operations are sent.