Page MenuHomePhabricator

Duplicates sent by Android app's event logging
Closed, ResolvedPublic


[timebox for initial exploration; 2 hours]

There are hundreds of duplicates of events being sent by the app.

Here's the query I used to catch the problem in my meeting with @Dbrant:

WITH top_device AS (
    CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) AS date,
    useragent.wmf_app_version AS app_version,
    event.app_install_id AS install_id,
    SUM(event.totalPages) AS total_pages,
    SUM(event.length) AS total_time,
    COUNT(1) AS n_sessions
  FROM event.MobileWikiAppSessions
  WHERE revision = 18115099
    AND year = ${year} AND month = ${month} AND day = ${day} AND hour = ${hour}
    AND useragent.os_family = 'Android'
    AND useragent.wmf_app_version > '2.7.2'
    AND useragent.wmf_app_version != 'r'
    AND NOT useragent.is_bot
    CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')),
    useragent.wmf_app_version, event.app_install_id
  ORDER BY n_sessions DESC
SELECT event
FROM top_device
LEFT JOIN event.MobileWikiAppSessions AS sessions ON (
  sessions.event.app_install_id = top_device.install_id
  AND sessions.revision = 18115099
  AND sessions.year = ${year} AND sessions.month = ${month} AND = ${day} AND sessions.hour = ${hour}
ORDER BY event.client_dt ASC
LIMIT 1000000;

The client_dt on these shows that the events are generated & sent by the app ~10s apart. So on our side when we count # of sessions by counting events, we're seeing 800+ "sessions" from some users per day.

Event Timeline

Charlotte updated the task description. (Show Details)

Change 484564 had a related patch set uploaded (by Dbrant; owner: Dbrant):
[apps/android/wikipedia@master] Improve robustness of Session funnel integration.

Change 484564 merged by jenkins-bot:
[apps/android/wikipedia@master] Improve robustness of Session funnel integration.