Telemetry#5381
Conversation
…e and TelemetryDataService
…user theme preference
…ule title in English
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5381 +/- ##
============================================
- Coverage 35.49% 35.40% -0.10%
- Complexity 11211 11241 +30
============================================
Files 1166 1171 +5
Lines 48077 48214 +137
============================================
+ Hits 17065 17068 +3
- Misses 31012 31146 +134 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I support all the comments about this in the various other topics about the same thing. Performance and theoretical (statistically flawed) "popularity" of add-on modules is not the responsibility of webtrees. If module creators want this they should jointly create it among themselves as a stand-alone module. Personally I will not have any part of this code on my server. Opt-in/out is not a satisfactory solution. |
Thank you for your feedback! Just a couple of quick clarifications:
Looking forward to other comments from the community! |
|
But all of that can only result in statistically meaningless data. There is no way to judge "relative popularity" from it. So enjoy the development, but I shall, as said, exclude the entire feature from my site. |
Why do you think the data would be "statistically meaningless"? Of course, the collected data would need to be weighed against the total number of active installations (which we already know thanks to the core upgrade checker).
The benefit of the manual, "on-demand" approach is that, should this feature ever be included in a future webtrees version (which is entirely up for discussion), you would not need to patch the software or alter the code to remove it. You simply choose not to click the "Send data" button in the control panel, and absolutely nothing is ever transmitted (you would also have to confirm sending the data after the preview to actually send telemetry data...). |
This draft pull request addresses the proposal for a core telemetry system as discussed in #5377.
It implements an entirely opt-in/on-demand flow to collect anonymous configuration and usage metrics, helping development focus on real-world usage patterns
Key Features Implemented:
Sample payload structure
{ "p_site_uuid": "removed", "p_metrics": { "php_version": "8.3.28", "php_memory_limit": "512M", "db_type": "mysql", "db_version": "8.4.3", "os_type": "Windows NT", "webtrees_version": "2.2.7-dev", "default_language": "en-US", "changes_count": 47129, "trees": [ { "individuals_count": 6349, "families_count": 2343, "sources_count": 104, "repositories_count": 0, "media_count": 3957, "notes_count": 0, "places_count": 759, "user_permissions_count": { "access": 5, "edit": 19, "admin": 1 } } ], "default_theme": "_jc-theme-justlight_", "users_count": 25, "user_settings": [ { "language": "it", "last_login_age_days": 1515, "account_age_days": 1565 }, { "language": "de", "last_login_age_days": 460, "account_age_days": 1776 }, { "language": "en-US", "last_login_age_days": 0, "account_age_days": 7047 }, { "language": "en-US", "last_login_age_days": -1, "account_age_days": 7047 }, ... ], "enabled_standard_modules": [ "ahnentafel_report", ... ], "custom_modules": [ "JustCarmen\\Webtrees\\Module\\JustlightTheme\\JustlightTheme", "JustCarmen\\Webtrees\\Module\\FancyTreeview\\FancyTreeviewModule", ... ] } }Database
Created on a dedicated organization/project in Supabase with the following table and function:
These are some sample queries that could be run on the sample JSON structure implemented (non existing fields in the JSON are nulled):
A generic function can be written for retrieving data aggregated, filtered and grouped by in a specific way, for instance the function below, reserved for webtrees developers:
The free Supabase account allows for a 500 MB database. With 8,000 sites, this means we could collect around 60 KB per site. Since our sample payload is only about 9 KB, it easily fits well within the limits.
UI Screenshots
Click to view the settings page
Click to view the control panel call to action
Click to view the preview page before sending
Click to view the data sent confirmation