Page MenuHomePhabricator

Update the Metrics Platform JS Client Library API to talk about Instrument Name
Closed, ResolvedPublic5 Estimated Story Points

Description

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

Notes

  1. We could base our work off of this MR: https://gitlab.wikimedia.org/repos/data-engineering/metrics-platform/-/merge_requests/39

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
[JS] Disable type checking for src/Instrument.jsrepos/data-engineering/metrics-platform!68phuedxwork/phuedx/T366827-follow-upmain
Allow MetricsClient#newInstrument(instrumentName)repos/data-engineering/metrics-platform!67phuedxwork/phuedx/T366827main
[JS] Extract EventSubmitter interfacerepos/data-engineering/metrics-platform!42phuedxwork/phuedx/event_submittermain
[JS] Create Instrument class/newInstrument APIrepos/data-engineering/metrics-platform!39phuedxwork/phuedx/submittermain
Customize query in GitLab

Event Timeline

VirginiaPoundstone renamed this task from Land MR !39 to Update API to talk about Instrument Name.Jul 15 2024, 3:35 PM
VirginiaPoundstone renamed this task from Update API to talk about Instrument Name to Update (the metrics platform) API to talk about Instrument Name.Jul 29 2024, 7:31 PM
VirginiaPoundstone triaged this task as Low priority.

If we have time to get started on this in Sprint 17, great!
@phuedx has the patch ready to go (says @cjming), so it might not be much work.

Is it backward compatible? Or is it a breaking change?

If we don't get to it sprint 17, it will be a higher priority in sprint 18.

Might be interesting work for @SGupta-WMF as part of onboarding? @WDoranWMF what do you think?

phuedx renamed this task from Update (the metrics platform) API to talk about Instrument Name to Update the Metrics Platform JS Client Library API to talk about Instrument Name.Aug 6 2024, 1:01 PM
phuedx updated the task description. (Show Details)
Sfaci set the point value for this task to 8.Aug 21 2024, 12:31 PM
Sfaci changed the point value for this task from 8 to 5.
phuedx added a subscriber: Sfaci.

MR 39 is blocked on MR 42, which is now ready for review (thanks for the ping @Sfaci!). I'll update the task description…

phuedx raised the priority of this task from Low to Medium.Aug 21 2024, 1:10 PM
phuedx updated the task description. (Show Details)