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:
parent
fea9b009b3
commit
16573a6381
2 changed files with 11 additions and 0 deletions
|
@ -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");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue