Events logged via the Metrics Platform must define a schema they can use as a "contract" on what data needs to be handled.
We might be able to use the existing VisualEditorFeatureUse schema for this. This is the preferable option. It also already includes some of the things we want to measure. See https://www.mediawiki.org/wiki/VisualEditor/FeatureUse_data_dictionary. It's currently also used to track VE related events from other extensions like Citoid or the WikiEditor (2010) using ve.track().
- Sampling is currently at 100%
- Check what data is keept and add more depending on our needs
Alternatively we would need to create our own schema. See T351298: [User Story] Partial migration of *UIActions instrument to the Core Interaction API is a current example on how this could be done. The custom data we want to log could probably go into the default buckets action and action_context. The interactions we want to log are simple one time events. The context could be used to log the edit session.
The third option would be using the monoschema approach. That's supposed to be a generic schema to track simple events with just a few keys. - But I'm not sure if this approach is already deprecated.