You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Track store failures after startup
This watches the `IndexedDBStore` in case it degrades. If it does, we track this in analytics so we can observe how often it happens in the field. Should help track errors like https://github.com/vector-im/riot-web/issues/7769
This commit is contained in:
@@ -147,3 +147,11 @@ async function checkCryptoStore() {
|
||||
log("Crypto store using memory only");
|
||||
return { exists, healthy: false };
|
||||
}
|
||||
|
||||
export function trackStores(client) {
|
||||
if (client.store && client.store.on) {
|
||||
client.store.on("degraded", () => {
|
||||
track("Sync store using IndexedDB degraded to memory");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user