Page MenuHomePhabricator

Make it easier to enable EventLogging's debug mode
Closed, DeclinedPublic

Description

Context

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:

[0]
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

Notes

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

DEBUGMODE.gif (1×958 px, 2 MB)

Related Objects

Event Timeline

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 mw.user.group?

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.

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 raised the priority of this task from Low to High.
Milimetric added a project: Analytics-Kanban.

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 lowered the priority of this task from High to Low.
Nuria removed a project: Analytics-Kanban.

cc-ing #product-infrastructure-team-backlog as an FYI