Page MenuHomePhabricator

Rename appInstallID, ts, sessionToken, timeSpent/duration property names in EL schemas
Closed, ResolvedPublic

Description

Per recommendations from Analytics Engineering (and my own personal preferences, tbh), we should use snake_case instead of camelCase for property names in EventLogging schemas.

Also in T191859#4255283 Andrew wrote:

We are trying to use the convention that fields named after dt are ISO-8601, and ‘timestamps’ or ts fields are unix epoch timestamps.

Since Sharvani is instrumenting parts of multilingual analytics in T190931 from scratch, it makes sense for that to use the new naming standards from the start, but there are dependencies on existing instrumentation that uses the existing naming conventions. We discussed this issue and decided that rather than having half of the new schema follow one convention and the other half follow the other convention, it's better to just rename these three common fields across all active schemas/funnels now.

Event Timeline

mpopov triaged this task as Medium priority.Jun 8 2018, 9:35 PM
mpopov created this task.

@mpopov also the timeSpent property please. Shoudl it be 'duration' from now on?

@mpopov also the timeSpent property please. Shoudl it be 'duration' from now on?

Great catch, thanks! I'll change duration to time_spent in the new schemas and change timeSpent to time_spent in existing ones.

mpopov renamed this task from Rename appInstallID, ts, and sessionToken property names in EL schemas to Rename appInstallID, ts, sessionToken, timeSpent/duration property names in EL schemas.Jun 8 2018, 11:53 PM

Change 439384 had a related patch set uploaded (by Sharvaniharan; owner: Sharvaniharan):
[apps/android/wikipedia@master] [WIP] Renaming properties in Analytics schemas

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

For @Sharvaniharan:

Funnels part of multilingual analytics

SchemaOld Revision IDNew Revision IDChanged Fields
MobileWikiAppDailyStats1811141818115101AppInstallIDapp_install_id, tsclient_dt
MobileWikiAppFeedConfigure1811141318115104AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent
MobileWikiAppLanguageSettings1811093418113720durationtime_spent
MobileWikiAppLanguageSearching1811097818113721durationtime_spent
MobileWikiAppSearch1811144318115103AppInstallIDapp_install_id, tsclient_dt, sessionTokensession_token
MobileWikiAppSessions1811141718115099AppInstallIDapp_install_id, tsclient_dt

Note: MobileWikiAppFeed schema has been modified too. Refer to T190931#4269717

Other funnels

Here are just the new revision IDs. In one case a funnel (Appearance Settings) will need special attention (marked) but otherwise it's just a list of schemas affected by the field name standardization and which fields specifically were renamed.

SchemaOld Revision IDNew Revision IDChanged Fields
MobileWikiAppAppearanceSettings1783688718113727AppInstallIDapp_install_id, tsclient_dt, currentValuecurrent_value, newValuenew_value
MobileWikiAppArticleSuggestions1783702118115091AppInstallIDapp_install_id, tsclient_dt
MobileWikiAppCreateAccount1783691418115095AppInstallIDapp_install_id, tsclient_dt, sessionTokensession_token
MobileWikiAppEdit1783707218115551AppInstallIDapp_install_id, tsclient_dt, sessionTokensession_token
MobileWikiAppFindInPage1783692018115552AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent
MobileWikiAppInstallReferrer1783716218115554AppInstallIDapp_install_id, tsclient_dt
MobileWikiAppIntents1783692218115555AppInstallIDapp_install_id, tsclient_dt
MobileWikiAppLinkPreview1783692618115548AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent, sessionTokensession_token
MobileWikiAppLogin1783692818115556AppInstallIDapp_install_id, tsclient_dt
MobileWikiAppMediaGallery1783694718115560AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent, sessionTokensession_token
MobileWikiAppNavMenu1783695118118517AppInstallIDapp_install_id, tsclient_dt, sessionTokensession_token
MobileWikiAppOfflineLibrary1783695518118712AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent
MobileWikiAppOnThisDay1783695718118721AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent
MobileWikiAppPageScroll1783697718118723AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent
MobileWikiAppProtectedEditAttempt1783699118118725AppInstallIDapp_install_id, tsclient_dt
MobileWikiAppRandomizer1783699718118733AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent
MobileWikiAppReadingLists1783708018118739AppInstallIDapp_install_id, tsclient_dt
MobileWikiAppShareAFact1807121518118760AppInstallIDapp_install_id, tsclient_dt, sessionTokensession_token
MobileWikiAppToCInteraction1807122818118763AppInstallIDapp_install_id, tsclient_dt
MobileWikiAppTabs1783702518118767AppInstallIDapp_install_id, tsclient_dt, sessionTokensession_token
MobileWikiAppWiktionaryPopup1783703818118768AppInstallIDapp_install_id, tsclient_dt, timeSpenttime_spent

@mpopov We will not be sending anymore events to MobileWikiAppOfflineLibrary. All Offline Library related code has been removed.

Change 439384 merged by jenkins-bot:
[apps/android/wikipedia@master] Renaming properties in Analytics schemas

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

Vvjjkkii renamed this task from Rename appInstallID, ts, sessionToken, timeSpent/duration property names in EL schemas to 4cbaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Sharvaniharan as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: Sharvaniharan; removed: gerritbot, Aklapper.
CommunityTechBot renamed this task from 4cbaaaaaaa to Rename appInstallID, ts, sessionToken, timeSpent/duration property names in EL schemas.Jul 2 2018, 12:57 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Sharvaniharan.
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: gerritbot, Aklapper; removed: Sharvaniharan.