Page MenuHomePhabricator

Log the user id and source title in eventlogging for campaign accept events
Closed, ResolvedPublic

Description

We log the user id, source language, target language, source title for a publish event. But user id and source title are not logged for the campaign accept event. This makes it difficult to find whether a translation started from a campaign got published or not.

Adding these two extra fields - user id and source title will make us to do analysis on effectiveness of each campaign including the publishing status.

Refer: https://meta.wikimedia.org/wiki/Schema:ContentTranslationCTA

Event Timeline

I created new revision of schema https://meta.wikimedia.org/w/index.php?title=Schema%3AContentTranslationCTA&type=revision&diff=16016255&oldid=11616099

Now we need to edit ContentTranslation.hooks.php and change the line

	$schemas['ContentTranslationCTA'] = 11616099;

to

	$schemas['ContentTranslationCTA'] = 16016255;

and pass the extra values from ext.cx.eventlogging.js

Change 318567 had a related patch set uploaded (by Santhosh):
Log the user id and source title in eventlogging for campaigns

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

Arrbee triaged this task as Medium priority.Nov 3 2016, 8:15 AM

Change 318567 merged by jenkins-bot:
Log the user id and source title in eventlogging for campaigns

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

@Amire80

  • (a general question) ContentTranslation schema events are not recorded in @deployment-eventlogging03:/srv/log/eventlogging/all-events.log?
  • I do not see user id field added to https://meta.wikimedia.org/wiki/Schema:ContentTranslationCTA and, as far as aI could see, user id is not recorded in log db ( I could be wrong).
  • I checked the production db - the newest translation tables in log db show event_sourceTitle added and populated (the latest timestamp indicates recent updates. ContentTranslationCTA_16017678 -2016112200085,ContentTranslationError_11767097 - 20161121234751, ContentTranslation_11628043 - 20161122002022).

I do not see user id field added to https://meta.wikimedia.org/wiki/Schema:ContentTranslationCTA and, as far as aI could see, user id is not recorded in log db ( I could be wrong).

See the token field. That holds the Username for logged in users or session token for anonymous users

Arrbee moved this task from Done to QA on the Language-Q2-2016-17 Sprint 3 board.
Arrbee moved this task from QA to Done on the Language-Q2-2016-17 Sprint 3 board.

Thanks, @santhosh! Yes, token has username recorded.

@santhosh - I was looking at https://logstash.wikimedia.org/app/kibana#/dashboard/ investigating a different issue and noticed quite few of the following errors:

2016-11-24T01:05:56	eventlogging	ERROR		eventlog1001.eqiad.wmnet	'token' is a required property
event.schema	  	  ContentTranslationCTA
thost	  	eventlog1001.eqiad.wmnet
tlevel	  	ERROR
tmessage	  	'token' is a required property

Validation of the schema is failed?