Page MenuHomePhabricator

Prepare EventLogging for temp accounts
Closed, ResolvedPublic1 Estimated Story Points

Description

Some things to look for (from parent task) in the codebase:

Use caseSearch termsCodesearch
Feature checks whether a user is registered->isAnon, ->isRegistered, mw.user.isAnon, mw.user.getId, mw.user.getRegistrationsearch results
Feature checks a user name (possibly then checking if it is registered)mw.user.getName, $user->getName, $user->getRealNamesearch results
IP address utility functions are imported/used (IP addresses may be found via an anonymous username)use Wikimedia\IPUtils, mw.util.isIPAddresssearch results
Feature renders a user name::userLink, ::revUserLink, ::revUserToolssearch results

Note (2024/09/16): The last two rows have been struck out as the search terms don't exist in the EventLogging codebase.

Event Timeline

@kostajh: I hope you don't mind but I've bold and update the codesearches in the description, scoping them to the EventLogging extension.

@Ahoelzl and @lbowmaker this work is part of DPE's temp account work. Please add this to work plan and schedule.

@Ahoelzl and @lbowmaker this work is part of DPE's temp account work. Please add this to work plan and schedule.

@VirginiaPoundstone do you all have a status update for this task?

I've reviewed the uses of all of the methods in the codesearches above and there are two things that need to a quick discussion:

  • The performer_name contextual attribute will be non-null for temporary and named users. Currently, performer_name is calculated with something like the following:
return $user->isAnon() ? null : $user->getName();

We do this because User#getName() returns the user's IP address if they are logged-out. We replicated this in the JS Metrics Platform client too (but mw.user.getName() doesn't return the user's IP address if they are logged-out). Should performer_name be null for logged-out and temporary users?

  • The performer_is_logged_in contextual attribute will be truthy for temporary users. This is correct but I there's some ambiguity. We should make sure that our documentation recommends collecting both the performer_is_logged_in and performer_is_temp contextual attributes together to make sure that analysts can resolve ambiguity if they need

I've reviewed the uses of all of the methods in the codesearches above and there are two things that need to a quick discussion:

  • The performer_name contextual attribute will be non-null for temporary and named users. Currently, performer_name is calculated with something like the following:
return $user->isAnon() ? null : $user->getName();

We do this because User#getName() returns the user's IP address if they are logged-out. We replicated this in the JS Metrics Platform client too (but mw.user.getName() doesn't return the user's IP address if they are logged-out). Should performer_name be null for logged-out and temporary users?

I would say that performer_name should be the temporary account's username, and not null.

  • The performer_is_logged_in contextual attribute will be truthy for temporary users. This is correct but I there's some ambiguity. We should make sure that our documentation recommends collecting both the performer_is_logged_in and performer_is_temp contextual attributes together to make sure that analysts can resolve ambiguity if they need

Sure, the documentation update sounds good to me.

+1 to the idea of changing docs. @kostajh go ahead with temp accounts rollout, this will only mean a doc update on our side. And thank you for pinging us.

Milimetric moved this task from READY TO GROOM to Backlog on the Test Kitchen board.
Milimetric set the point value for this task to 1.