element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.23k stars 2k forks source link

Deduplicating/debouncing UISI telemetry reportage #6866

Closed ara4n closed 2 years ago

ara4n commented 6 years ago

We now have some basic reportage of UISI stats to matomo!! Yay! https://github.com/matrix-org/matrix-react-sdk/pull/1949

Whilst this gives us a very coarse value, it is going to overestimate failures perhaps to the point of being unusable, given the app may decrypt the same events multiple times (e.g. does this event fire when switching rooms?), and moreover if the decryption fails but is rapidly fixed (as happens quite often) then it'll still be reported as an error.

My suggestion is that we just shove these errors into a hash, deduplicated based on message ID, and removed if that message subsequently gets correctly decrypted. And then have a recurring timer which reads from the hash and looks at any failures older than 1 minute and reports them through to piwik.

lampholder commented 6 years ago

An additional point from our chat earlier - the hash will only be persisted on a per-session basis; the objective of this proposal is dramatically increase the accuracy of the reported figure, not to bring us to 100% accuracy.

turt2live commented 2 years ago

The crypto team has been improving the quality of this metric over the last year: Closing in favour of that work.