Page MenuHomePhabricator

Update CTR instrument to set the instrument name
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

The purpose of this task is to update the CTR instrument to allow developers to set an instrument name to use as the value for the instrument_name interaction data field.

Acceptance criteria

  • CTR instrument allows to set an instrument name and this value is used to fill the instrument_name interaction data field when submitting events

Event Timeline

Sfaci set the point value for this task to 2.Jan 28 2025, 11:05 AM

One way of doing this would be to:

  1. Update ClickThroughRateInstrument to work with instances of Instrument, e.g.
const i = mw.eventLog.newInstrument( STREAM_NAME, SCHEMA_ID );

ClickThroughRateInstrument.start( ELEMENT_SELECTOR, ELEMENT_FRIENDLY_NAME, instrument );
  1. Update the toy experiment code to use Instrument and the new API above

Change #1115130 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/extensions/WikimediaEvents@master] Make CTR instrument pass in experiment name

https://gerrit.wikimedia.org/r/1115130

Change #1115130 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Make CTR instrument pass in experiment name

https://gerrit.wikimedia.org/r/1115130

Change #1122232 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/extensions/WikimediaEvents@wmf/1.44.0-wmf.17] Make CTR instrument pass in experiment name

https://gerrit.wikimedia.org/r/1122232

Change #1122232 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@wmf/1.44.0-wmf.17] Make CTR instrument pass in experiment name

https://gerrit.wikimedia.org/r/1122232

Mentioned in SAL (#wikimedia-operations) [2025-02-24T22:42:51Z] <cjming@deploy2002> Started scap sync-world: Backport for [[gerrit:1122232|Make CTR instrument pass in experiment name (T384911)]]

Mentioned in SAL (#wikimedia-operations) [2025-02-24T22:45:26Z] <cjming@deploy2002> cjming: Backport for [[gerrit:1122232|Make CTR instrument pass in experiment name (T384911)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-02-24T22:52:09Z] <cjming@deploy2002> Finished scap sync-world: Backport for [[gerrit:1122232|Make CTR instrument pass in experiment name (T384911)]] (duration: 09m 17s)