Page MenuHomePhabricator

[Metrics Platform] QA/testing privleged mode: eventlogging-display-web, a QA user group, or something else?
Open, MediumPublic

Description

For QA and testing it is extremely handy to have access to the protected state of the EventLogging extension. However, for many events, such as session_tick, the events may be firing from many different browser windows and tabs, which makes it modifying local state a tricky proposition.

Things that are useful in such a mode include:

  • Inspecting the loaded stream configs
  • Inspecting the state of the output queue
  • Displaying events that will be sent as JSON in the console or in the browser as a pop-up
  • Always being in-sample

What is the best mix of behavior here. Whatever it is it should be specified to make the task of QA easier.

Event Timeline

Adding a note here that it is probably not a good idea to be able to gain this access using a setting that is not restricted or regulated in some way, i.e. if the user or agent is able to obtain this state themselves. This kind of unregulated access is what we have today with EventLogging's 'debugMode' via the hidden user setting 'eventlogging-display-web', but importantly this has not affected the core operation of the library nor the events that hit the wire, only what is displayed locally to the user. In a recent patch we also made it cause the user agent to be in-sample no matter what the stream config is. This is a slippery slope and we should back it out as soon as practical. Altered sampling rate and/or the ability to inspect the internal state (such as we might desire for e.g. unit testing), actually change the behavior in a way that is deeper than just what is being displayed locally, and hence should likely not be controlled by something as simple as a hidden option.

LGoto triaged this task as Medium priority.Mar 24 2021, 6:18 PM