Page MenuHomePhabricator

[Spike] What is the best way for our analyst to visualize active schemas?
Closed, ResolvedPublicBUG REPORT

Description

Jennifer (our analyst) needs an easy way to look at active schemas to look up information like sampling rate and understanding the possible values in the associated schema

A while back @phuedx pointed me towards https://en.wikipedia.org/wiki/Special:ApiSandbox#action=streamconfigs&format=json&all_settings=1

I suggested to Olga that the web team could create a wmflabs / wmcloud static app for viewing data. This would be a useful service in the same way patchdemo is useful to multiple teams across WMF.

The initial version would be:

  • Built in Vue.js using Codex components
  • Show schemas and sampling rate

Later versions would allow exploring and previewing the schema data - a capability that's been lacking since we migrated away from wiki pages (e.g. https://meta.wikimedia.org/wiki/Schema:MobileWebInfobox). We'd likely need support from Sam and co. to update/add APIs to provide the information we need.

Event Timeline

A couple of thoughts:

  1. Unfortunately, a lot of our instruments do their own sampling so the sampling rate and unit aren't embedded in in the streamconfigs API response. You're going to have to do detective work to track that information down and create a mechanism to keep it up to date. While you're doing that detective work, however, if you do spot instruments that can be migrated to using the sampling mechanism baked into EventLogging, then absolutely do the migration!

Later versions would allow exploring and previewing the schema data - a capability that's been lacking since we migrated away from wiki pages

This is provided by DataHub. Could the problem as stated by solved more immediately by keeping documentation and tags up to date there?

  1. There is a decent overlap between this and a project that the Metrics Platform team is planning for FY2022-23 – a control panel for event streams. The control panel will allow you to list, create, update, and disable event streams via a UI. We're fleshing out the work in T330354: [Goal] Build the Metrics Platform control plane. Following on from my first comment, the control panel will need to provide a mechanism for the user to specify the config variable that defines the sampling rate with the stream.

None of this is to say "Don't do it that way!" There's a definite need here and I'd love to talk about it with Readers Web more.

Update: I make a bookmarklet [1] which addresses Jennifer's immediate needs for understanding how our click tracking works and possible values (our main problem is we use raw strings rather than enum which is great for extensibility, but documentation not so much. I have to duplicate the logic in WikimediaEvents for this to work but it's good enough. I could also expand this to include the existing sampling rate (where available) which might provide momentum for moving sample rate declarations into the instruments.

[1] javascript:mw.loader.load('https://en.wikipedia.beta.wmflabs.org/w/index.php?title=MediaWiki:EventLoggingHints.js&action=raw&ctype=text/javascript%27)
ovasileva triaged this task as Medium priority.Mar 6 2023, 10:31 PM
ovasileva moved this task from Incoming to Current Quarter on the Web-Team-Backlog-Archived board.

Discussed with the team and decided that we probably want to convert this task into a spike to look over potential solutions.

Jdlrobson renamed this task from Visualize active schemas to [Spike] What is the best way for our analyst to visualize active schemas?.May 16 2023, 1:17 AM

Jennifer and I met and we have devised a plan to build out Infobox type content within DataHub. Notes here Touch base with @Jdlrobson when he gets back to sign off

Jdlrobson added subscribers: NBaca-WMF, KSarabia-WMF.

I can't view Google Doc. Perhaps @NHillard-WMF could sign this one off. Sign off here would be to create a ticket pointing to the notes with the suggested follow up action (provided it seems reasonable and something the team should work on).

Jdrewniak added a subscriber: jwang.

@KSarabia-WMF will be working with @jwang on documenting instrumentation on DataHub in this follow-up ticket T338340.