Background
Following on from the changes made as part of the parent task, there is an opportunity to improve the Developer Experience (DX) for instrument developers. The detail of the changes and API proposal are detailed here and the overview is quoted below:
Instruments using MetricsClient#submitInteraction() and other methods will need to repeat the streamName and schemaID parameters on every invocation. In order to allow instrument maintainers to keep their instruments DRY, I propose adding the Instrument class, a class that has a MetricsClient-like interface but is bound to a specific {streamName,schemaID} pair.
AC
- MR 42 is reviewed and merged
- The MR is updated to reflect the description
- The MR is reviewed and merged
- A new version of the JS Metrics Platform Client Library is released and deployed
- Metrics Platform/JavaScript API is updated
Notes
- We could base our work off of this MR: https://gitlab.wikimedia.org/repos/data-engineering/metrics-platform/-/merge_requests/39