==== Background
Existing metrics use the legacy EventLogging system. There was a [[ https://grafana-rw.wikimedia.org/d/uXX3yj1Mz/codemirror?forceLogin&orgId=1 | Grafana dashboard ]] but it is now marked for cleanup. This task is about instrumentation for CodeMirror 6, starting from a clean slate. This data will help us evaluate which features are the most popular, and influence what is decided as the default set of features in the longer-term goal of having CodeMirror on by default for interest projects (i.e. T288161).
As part of this task, we should retire the existing legacy instrumentation.
==== Data questions
* How many people are using CodeMirror?
* Which editors are being used with CodeMirror (2017 editor, WikiEditor, or standalone CodeMirror)?
* Which [[ https://www.mediawiki.org/wiki/Help:Extension:CodeMirror#Features | CodeMirror features ]] are being used?
** Bracket matching
** Template folding
** Autocompletion
** Line numbering
** Highlighting the active line
** Line wrapping
** Highlighting special characters
** Bidi isolation
* What is the relationship of editor experience and the various features? (edit count bucketing)
==== Implementation
It seems like the [[ https://wikitech.wikimedia.org/wiki/Metrics_Platform | Metrics Platform ]] is the latest and greatest system to use.
However, previous editing-focused instrumentation such as #realtime_preview used the existing `VisualEditorFeatureUse` schema, despite it also being "legacy". It may make sense to use that here as well, to keep editing-related metrics in one place.