Page MenuHomePhabricator

StoryBuilder instrumentation
Closed, ResolvedPublic

Description

Schema: https://gerrit.wikimedia.org/r/c/schemas/event/secondary/+/773382/2/jsonschema/analytics/mediawiki/wikistories_contribution_event/1.0.0.json (there's an example of an event at the bottom of the schema)
Instrumentation plan: https://docs.google.com/document/d/10saUCO6lIl8CsSJ4wOOuEfDlyagdP3DMXFP9q4ByMP8/edit#heading=h.j6ln726k45kt

Events to log:

  • story_builder_open
  • publish_success
  • publish_failure

Fields to log for each event is described in the plan and the schema.

Event Timeline

SBisson triaged this task as High priority.Apr 13 2022, 3:24 PM
SBisson updated the task description. (Show Details)
SBisson updated the task description. (Show Details)

I didn't include the phab ticket number in the first git review and I guess gerritbot didn't like that, but this is the patch: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikistories/+/784351

Change 784351 had a related patch set uploaded (by Sbisson; author: Eamedina):

[mediawiki/extensions/Wikistories@master] Story builder instrumentation

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

Change 784351 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Story builder instrumentation

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

Testing:

Story Builder Open:

event: {

  "$schema": "/analytics/mediawiki/wikistories_contribution_event/1.0.0",
  "meta": {
    "stream": "mediawiki.wikistories_contribution_event",
    "domain": "localhost",
    "dt": "2022-05-18T16:03:29.008Z"
  },
  "access_method": "mobile web",
  "user_name": "Localtest",
  "user_edit_count_bucket": "1-4",
  "user_is_anonymous": false,
  "context_page_title": "Coconuts",
  "story_already_exists": false,
  "activity_session_id": "f7f1723ab9dccecad85b",
  "event_type": "story_builder_open",
  "dt": "2022-05-18T16:03:29.009Z"
}

publish_failure:
event: {

  "$schema": "/analytics/mediawiki/wikistories_contribution_event/1.0.0",
  "meta": {
    "stream": "mediawiki.wikistories_contribution_event",
    "domain": "localhost",
    "dt": "2022-05-18T15:56:12.492Z",
    "id": "e814a6ab-e60b-47fe-97aa-7e04507ced66",
    "request_id": "0b1d9e60-d6c3-11ec-8833-0b77b8c8e58c"
  },
  "access_method": "mobile web",
  "user_name": "Localtest",
  "user_edit_count_bucket": "1-4",
  "user_is_anonymous": false,
  "context_page_title": "Coconuts",
  "story_already_exists": false,
  "activity_session_id": "9fb72c8beaa565b9e102",
  "event_type": "publish_failure",
  "story_title": "Noob",
  "publish_failure_message": "Another story with the same title already exists. Please enter a unique story title.",
  "dt": "2022-05-18T15:56:12.492Z"
}

publish_success:

event: {

  "$schema": "/mediawiki/revision/create/1.1.0",
  "meta": {
    "uri": "http://localhost:8080/wiki/Story:Noobie",
    "request_id": "dc50732d56d6f89691d1d18b",
    "id": "66c076c8-0174-4a46-8da1-228a9878b8c0",
    "dt": "2022-05-18T15:56:33Z",
    "domain": "localhost",
    "stream": "mediawiki.page-create"
  },
  "database": "my_wiki",
  "page_id": 46,
  "page_title": "Story:Noobie",
  "page_namespace": 1704,
  "rev_id": 68,
  "rev_timestamp": "2022-05-18T15:56:32Z",
  "rev_sha1": "mf3sx7jz2t55m0oucvdcozi6xnh5y9m",
  "rev_minor_edit": false,
  "rev_len": 2753,
  "rev_content_model": "story",
  "rev_content_format": "application/json",
  "performer": {
    "user_text": "Localtest",
    "user_groups": [
      "*",
      "user",
      "autoconfirmed"
    ],
    "user_is_bot": false,
    "user_id": 4,
    "user_registration_dt": "2022-05-18T14:58:54Z",
    "user_edit_count": 1
  },
  "page_is_redirect": false,
  "comment": "Created page with \"other fruits because their endosperm contains a large quantity of clear liquid, called coconut water or coconut juice. Mature, ripe coconuts can be used as edible seeds, or processed for oil and plant milk from the flesh, charcoal from the hard shell, and coir from the fibrous husk. Dried coconut flesh is called copra, and the oil and milk derived from it are commonly used in cooking – frying in particular – as well as in soaps and cosmetics. Sweet coconut sap can be made i\"",
  "parsedcomment": "Created page with "other fruits because their endosperm contains a large quantity of clear liquid, called coconut water or coconut juice. Mature, ripe coconuts can be used as edible seeds, or processed for oil and plant milk from the flesh, charcoal from the hard shell, and coir from the fibrous husk. Dried coconut flesh is called copra, and the oil and milk derived from it are commonly used in cooking – frying in particular – as well as in soaps and cosmetics. Sweet coconut sap can be made i"",
  "rev_slots": {
    "main": {
      "rev_slot_content_model": "story",
      "rev_slot_sha1": "mf3sx7jz2t55m0oucvdcozi6xnh5y9m",
      "rev_slot_size": 2753,
      "rev_slot_origin_rev_id": 68
    }
  }
}