As part of T329506, do an initial update of the guide to creating an instrument with Metrics Platform so that it is up to date and follows a step-by-step process.
To do:
- [x] Review https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_An_Instrument and https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_First_Metrics_Platform_Instrument, and determine whether they can be consolidated
- Conclusion: These two pages contain a lot of duplicate content and appear to serve the same purpose. I plan to check with stakeholders and merge the two pages into one.
- Interim measures to address critical friction points
- [x] Remove 7,000+ bytes of duplicated content between the two pages to stop content drift in the interim (edits: [1](https://wikitech.wikimedia.org/w/index.php?title=Metrics_Platform%2FHow_to%2FCreate_An_Instrument&diff=2207483&oldid=2151605), [2](https://wikitech.wikimedia.org/w/index.php?title=Metrics_Platform%2FHow_to%2FCreate_First_Metrics_Platform_Instrument&diff=2207484&oldid=2204395))
- [x] Transclude the newly created section on planning an experiment from https://wikitech.wikimedia.org/wiki/Event_Platform/Instrumentation_How_To#Writing_MediaWiki_instrumentation_code into both Metrics Platform pages
- [ ] Merge the two pages
- [ ] Restructure the page to follow a step-by-step process
- [ ] Identify supporting documents
- [ ] Identify missing or out-of-date information
- [ ] Work with Data Products team to add or update information
- [ ] Identify next steps
### Outline of step-by-step process (work in progress)
(To do)
### Content review
Prior to edits on July 17
**Metrics Platform/How to/Create An Instrument**
- What is Metrics Platform
- Link to [core schemas](https://gerrit.wikimedia.org/r/plugins/gitiles/schemas/event/secondary/+/refs/heads/master/jsonschema/analytics/product_metrics/)
- Transcludes https://wikitech.wikimedia.org/wiki/Template:Metrics_Platform/Docs/Content/Instrument_Overview
- Set up development environment
- Implement instrument code on web
- Transcludes https://wikitech.wikimedia.org/wiki/Template:Metrics_Platform/Docs/Content/Writing_mediawiki_instrumentation_code_using_eventlogging_extension
- Language-specific sections
- Implement instrument code on mobile
- Language-specific sections
- Deployment
- Link to https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Creating_a_Stream_Configuration
- Viewing and querying events
- Link to https://wikitech.wikimedia.org/wiki/Event_Platform/Instrumentation_How_To
- Overriding event stream config settings
- Link to https://wikitech.wikimedia.org/wiki/Event_Platform/Instrumentation_How_To
- Decommissioning
- Link to https://wikitech.wikimedia.org/wiki/Event_Platform/Instrumentation_How_To
**Metrics Platform/How to/Create First Metrics Platform Instrument**
Orgiginally based on [Getting started with Metrics Platform](https://docs.google.com/document/d/1cxhQqkSYECdgffdUxYIaAudbzxxLPPXFDdM0qnGv4rQ/edit#heading=h.he6niilempyb) (Google Doc)
- Link to https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Setup_Mediawiki_for_Metrics_Platform
- Document the instrument
- Plan to decommission the instrument
- Link to [core schemas](https://gerrit.wikimedia.org/r/plugins/gitiles/schemas/event/secondary/+/refs/heads/master/jsonschema/analytics/product_metrics/)
- Link to https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_a_Custom_Schema
- Implement instrument code
- Transcludes https://wikitech.wikimedia.org/wiki/Template:Metrics_Platform/Docs/Content/Writing_mediawiki_instrumentation_code_using_eventlogging_extension
- Language-specific sections with a requirements section that links to https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Getting_Started#Javascript and then duplicates content from https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_An_Instrument
- Configure the stream
- Link to https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Creating_a_Stream_Configuration
- Validate the events (large section of unique content)
- Deploy the stream
- Duplicates content from https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_An_Instrument
- Review your data
- Link to https://wikitech.wikimedia.org/wiki/Event_Platform/Instrumentation_How_To