openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
855 stars 283 forks source link

Instrument very long running tasks in Matomo #4210

Open teolemon opened 1 year ago

teolemon commented 1 year ago

Instrument very long running tasks in Matomo so that we can spot problematic issues with background sync

_Originally posted by @teolemon in https://github.com/openfoodfacts/smooth-app/pull/4166#discussion_r1233346138_

monsieurtanuki commented 1 year ago

@teolemon For the record we're talking about 10 second tasks. Which I wouldn't call long running.

teolemon commented 1 year ago

Ok, I was under the impression that tasks would run longer if they failed in unexpected ways

monsieurtanuki commented 1 year ago

Ok, I was under the impression that tasks would run longer if they failed in unexpected ways

@teolemon We're talking about downloading the products of 100 barcodes. We may split it into smaller chunks (e.g. 24 products): less work (at once) for the server, less data downloaded (at once), less likely to fail. Adding some matomo wouldn't really help, here.

That said, we can track each background task creation, call, success and failure. May be quite verbose.