Page MenuHomePhabricator

Make it easier to enable EventLogging's debug mode
Open, LowPublic



The code for debug mode is currently loaded on all pages but is enabled by a hidden user preference, which can be toggled by typing the following incantation in your browser's console:

new mw.Api().saveOption('eventlogging-display-web', '1')

User Story

As an experimenter (engineer, analyst, PO)
I want to see EventLogging events that are being sent in the MediaWiki UI
So that I can verify that they are correct with ease

Acceptance Criteria

  • The user preference that toggles debug mode is visible to users with the appropriate user right; otherwise, it's hidden


  1. For the curious, here's a screencap of what EventLogging's debug mode looks like:

Event Timeline

phuedx created this task.Mar 1 2018, 5:42 PM
Restricted Application added a project: Analytics. · View Herald TranscriptMar 1 2018, 5:42 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Timo, is this feasible to do in JS? We're not familiar enough with mediawiki

is it somewhere like

Milimetric moved this task from Incoming to Backlog (Later) on the Analytics board.Mar 1 2018, 5:58 PM
Tbayer added a subscriber: EBernhardson.
Krinkle added a comment.EditedMar 1 2018, 9:00 PM

I think there may've been an incorrect assumption somewhere here. The task summary t mentions of user groups, but this feature is in no way restricted or associated with user groups, user rights, or any other form of authentication or permission.

The code is loaded on all pages by default (not sure why actually..), with an conditional on a certain user preference.

That user preference is turned off by default, is hidden from the Special:Preferences page, and can be turned on by anyone using the API.

The API method (e.g. via a JS one-liner in your browser console) is also the only way for anyone to turn it on currently.

The current tasks sounds like it asks for a way to allow more users to enable it, which doesn't quite make sense in this context.

But I think that's just me misunderstanding it. I would support making it easier to enable, without needing to paste a line of code in the browser console. And because this is mostly a developer-facing feature, I suppose you want that "easier" way not to be available to all users, but restricted to certain user groups.

If that understanding is correct, my recommendation would be to use a user-right to control the visibility of the user preference. Then, users with the appropriate permission granted, will see an extra checkbox on their preferences page. This would not affect the ability for anyone to be able to toggle it from the browser console (like it is today, which will continue to work).

This user right can then be granted to specific user groups, either through wmf-config in Git, or (for global user groups) on Meta by Stewards.

I would recommend against a link in the sidebar as the interface, and instead use the Preferences page.

phuedx renamed this task from Open up EventLogging's debug mode to certain users to Make it easier to enable EventLogging's debug mode.Mar 2 2018, 10:43 AM
phuedx updated the task description. (Show Details)

Thanks for the feedback, @Krinkle. You're right that the description was a little confused and I was aiming for "Make it easier to…" rather than "Open up…". I've updated the task accordingly.

Imarlier moved this task from Inbox to Radar on the Performance-Team board.Mar 5 2018, 8:59 PM
Imarlier edited projects, added Performance-Team (Radar); removed Performance-Team.

Thanks so much @Krinkle and @phuedx, very clear now. We'll triage accordingly, but as people know we're not mediawiki devs so these kinds of tasks take us longer.

Milimetric triaged this task as Low priority.Apr 23 2018, 4:53 PM
Milimetric moved this task from Backlog (Later) to Smart Tools for Better Data on the Analytics board.
Milimetric raised the priority of this task from Low to High.
Milimetric added a project: Analytics-Kanban.
Nuria edited projects, added Analytics-Kanban; removed cloud-services-team (Kanban).
Nuria moved this task from In Progress to Paused on the Analytics-Kanban board.
Nuria added a subscriber: Nuria.Jan 25 2019, 11:52 PM

To be honest I do not see us working on this feature soon, the debug mode is intended for devs and * I think* asking devs to paste 1 line the console is quite acceptable. Maybe I am thinking this way cause i do not work much on mediawiki so the thought that to interact with javascript instrumentation you go to a special mediawiki page is a bit odd. Eventlogging has been refactored as of recent and works have been revamped to explain how to turn the debug mode on. Moving this to low priority.

Nuria removed Milimetric as the assignee of this task.Jan 25 2019, 11:52 PM
Nuria lowered the priority of this task from High to Low.
Nuria removed a project: Analytics-Kanban.