Page MenuHomePhabricator

Instrumentation from SI case -> Action taken
Closed, ResolvedPublic

Description

Use case: As a product analyst I need to be able to connect the SI case to the actions that may be taken for this case, for this account. To be able to do this i need the account ids to be recorded in some of the events.

There are 3 things to change in the event.mediawiki_product_metrics_suggested_investigations_interaction:

  • on case_updated in action_context should look something like {"i":83,"uids":[4567890]}, where uid is the ids of the accounts added to the case
  • on case_open in action_context should be included the uids of the accounts that are in the newly created case
  • right now in some cases account id is filled in on the case_open and case_updated events in the performerid field, it should be removed, set to 0, as this update is happening by the service.

Event Timeline

right now in some cases account id is filled in on the case_open and case_updated events in the performerid field, it should be removed, set to 0, as this update is happening by the service.

It doesn't look like it is possible to override the value of performer_id, so not sure we will be able to do this. Is changing this important?

Additionally, for both case_updated and case_open there can be more than one user added to the case (so we cannot just have a one user ID). For case_open we may see more user IDs than is possible to store in action_context. There are discussions about increasing this limit, so I will raise this point as another use case for this

Moved to 'In refinment' until action_context length decision has been made

@Dreamy_Jazz , lets create a custom field and move on with this.

I've not created a custom schema before, so definitely work in progress but created https://gitlab.wikimedia.org/repos/data-engineering/schemas-event-secondary/-/commits/T409260?ref_type=heads as branch for the WIP changes. Will create a PR when it's closer to being ready

We will also need a operations/mediawiki-config patch to register this stream, and a patch to Extension:CheckUser to update the instrumentation submission code, as the MetricsPlatform client won't work with this stream (afaik, cc @phuedx)

Yes. I wanted to get the schema reviewed first in case there were any big changes from that which would affect the other patches

Change #1216831 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] [Very WIP] Use new instrumentation stream

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

Change #1216865 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[operations/mediawiki-config@master] Define config for v2 of suggested investigations instrument

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

Change #1217142 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[integration/config@master] Zuul: [mediawiki/extensions/CheckUser] Add EventBus dependency

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

Change #1217142 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/extensions/CheckUser] Add EventBus dependency

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

Change #1217204 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Add EventBus to Phan config

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

Change #1217212 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Create NoOpSuggestedInvestigationsInstrumentationClient

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

Change #1217204 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add EventBus to Phan config

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

Change #1216865 merged by jenkins-bot:

[operations/mediawiki-config@master] Define config for v2 of suggested investigations instrument

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

Mentioned in SAL (#wikimedia-operations) [2025-12-10T15:27:48Z] <dreamyjazz@deploy2002> Started scap sync-world: Backport for [[gerrit:1216865|Define config for v2 of suggested investigations instrument (T409260)]]

Mentioned in SAL (#wikimedia-operations) [2025-12-10T15:29:42Z] <dreamyjazz@deploy2002> dreamyjazz: Backport for [[gerrit:1216865|Define config for v2 of suggested investigations instrument (T409260)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-12-10T15:34:34Z] <dreamyjazz@deploy2002> Finished scap sync-world: Backport for [[gerrit:1216865|Define config for v2 of suggested investigations instrument (T409260)]] (duration: 06m 47s)

Change #1217212 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Create NoOpSuggestedInvestigationsInstrumentationClient

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

Change #1216831 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Suggested investigations: Use new instrumentation stream

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

per conversation with @Dreamy_Jazz this will be tested mostly by the engineers.

QA will ensure UI functions as expected

We found that the instrumentation didn't work as expected, but have fixed it and verified it is working