Page MenuHomePhabricator

Slim down Navigation Timing schema
Closed, ResolvedPublic


Current properties as of Revision 17216284

Navigation TimingunloadEventStart Removed
Navigation TimingunloadEventEnd Removed
Navigation TimingredirectStart Removed
Navigation TimingredirectEnd Removed
Navigation TimingredirectCount Removed
Navigation TimingfetchStart
Navigation TimingdomainLookupStart Removed
Navigation TimingdomainLookupEnd Removed
Navigation TimingconnectStart
Navigation TimingsecureConnectionStart
Navigation TimingconnectEnd
Navigation TimingrequestStart
Navigation TimingresponseStart Keep - Useful event (time to first byte).
Navigation TimingresponseEnd
Navigation TimingdomInteractive Keep - Useful event.
Navigation TimingdomContentLoadedEventStart Removed
Navigation TimingdomContentLoadedEventEnd Removed
Navigation TimingdomComplete Keep - Useful event.
Navigation TimingloadEventStart Keep - Useful event.
Navigation TimingloadEventEnd Keep - Useful event.
Navigation Timing (derived)dnsLookup(domainLookupEnd - domainLookupStart) Keep - Useful delta.
Navigation Timing (derived)unload(unloadEventEnd - unloadEventStart) Keep - Useful delta.
Navigation Timing (derived)redirecting(redirectEnd - redirectStart) Keep - Useful delta.
Paint Timing APIfirstPaint Keep - Useful event.
MediaWikiactionWikiPage action Keep - Useful for debugging.
MediaWikimobileModeMobileFrontend Unsure ??
MediaWikiisAnonUser Keep - Useful for data fragmentation.
MediaWikiisHttp2Varnish ext: Connection Properties Removed
MediaWikiisHiDPIDerived from window.devicePixelRatio Removed
MediaWikimediaWikiVersionmw.config: wgVersion Unsure ??
MediaWikioriginCountryGeo Keep - Useful for data fragmentation.
MediaWikioriginRegionGeo Removed
MediaWikipageIdWikiPage title Removed
MediaWikinamespaceIdWikiPage title Keep - Useful for debugging.
MediaWikirevIdWikiPage revision Keep - Useful for debugging.
MediaWikimediaWikiLoadCompleteResourceLoader Keep - Useful event. Related: T160315.

Round 1 (completed)


  1. pageId - Was for debugging, but seems obsolete with revId.
  2. originRegion - No longer used.
  3. domContentLoadedEventStart - Not used.
  4. domContentLoadedEventEnd - Not used.
  5. isHttp2 - Not used. This currently collected from a cookie set by Varnish. Varnish already sends this to Graphite directly, however. See Grafana dashboard: Client Connections.
  6. isHiDPI - Not used? Not particularly useful for debugging. I suggest interested parties collect it through separate WikimediaEvents campaigns.

Round 2 (completed)

Blocked on T104902 and T203216.

  • unloadEventStart - Redundant with unload delta.
  • unloadEventEnd - Redundant with unload delta.
  • redirectStart - Redundant with redirecting delta.
  • redirectEnd - Redundant with redirecting delta.
  • domainLookupStart - Redundant with dnsLookup delta.
  • domainLookupEnd - Redundant with dnsLookup delta.
  • redirectCount - Not used? If we really want to know this for (unrelated) statistical reasons, I suggest we collect it through its own campaign from WikimediaEvents for a short time. Perhaps once or twice a year for a few days/weeks.

Next round

Uncertain / considering for removal:

  • mobileMode - Used for data fragmentation, but unsure whether it is receives enough samples to be useful. Check with Reading.
  • mediaWikiVersion - Not used. Probably added for debugging, but the version can already be derived based on EventCapsule properties wiki and timestamp if really needed.

See also:

Event Timeline

Imarlier triaged this task as Medium priority.

Change 410472 had a related patch set uploaded (by Imarlier; owner: Imarlier):
[mediawiki/extensions/NavigationTiming@master] ext.NavigationTiming: Remove some unnecessary properties

Review ^ is for a change that removes several of these, but not all.

Specifically, removes:

  • pageId
  • originRegion
  • domContentLoadedEventStart
  • domContentLoadedEventEnd
  • isHttp2
  • isHiDPI

mobileMode and mediaWikiVersion I don't want to remove without more input, which I haven't had a chance to solicit.

Change 410472 merged by jenkins-bot:
[mediawiki/extensions/NavigationTiming@master] ext.NavigationTiming: Remove some unnecessary properties

Reminder: Add an updated sample to the test fixture in puppet:webperf/navtiming with these fields removed, and with the specialpage and netinfo fields added (per T182361).

With T104902 and T203216 closed, we can move on to Round 3.

Next round

  • unloadEventStart
  • unloadEventEnd
  • redirectStart
  • redirectEnd
  • domainLookupStart
  • domainLookupEnd
  • redirectCount

I ran a search through Grafana dashboards and confirmed that none of the above are used.

Searching for: /[("'{,].+\.(unloadEventStart|unloadEventEnd|redirectStart|redirectEnd|redirectCount|domainLookupStart|domainLookupEnd)[^"')}]+/g
... found 334 dashboards

Turns out, the above aren't just unused, we don't even report them from the client code. They've been in the schema for a while but are completely non-existent in our actual events, not expected in our tests, and not processed (couldn't be) by our Python code.

Krinkle updated the task description. (Show Details)

Change 463567 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/NavigationTiming@master] Update schema to match currently reported properties

Change 463569 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/NavigationTiming@master] Remove 'redirectCount' from NavigationTiming event objects

Change 463567 merged by jenkins-bot:
[mediawiki/extensions/NavigationTiming@master] Update schema to match currently reported properties

Change 463569 merged by jenkins-bot:
[mediawiki/extensions/NavigationTiming@master] Remove 'redirectCount' from NavigationTiming event objects

Change 477852 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[performance/navtiming@master] Remove creation of frontend.navtiming metrics in favour of navtiming2

Change 477852 merged by jenkins-bot:
[performance/navtiming@master] Remove creation of frontend.navtiming metrics in favour of navtiming2

The remaining one from this analysis is mobileMode, which we do actually use (I missed it somehow). While the mobile-beta vs mobile-stable breakdown might be unused, we also use it as a boolean to create the "by platform" breakdown between mobile and desktop.

I think long-term we should consider changing that breakdown to be about the served experience rather than the domain name served through. E.g. instead of m-dot vs canonical, it would be fragment by skin+action. For example minerva_pageview, minerva_pagehistory, vector_pageview, vector_pageedit, etc. which I believe is more useful and actionable given that these would actually have a common experience to be measured.

The current breakdown has a number of variants that make it hard to action on. E.g. users can change their skin (monobook, timeless, but also minerva on desktop and vector on mobile), and have very different kinds of content served (e.g. view, page history, editor, deletion form, logged-in form; are quite different).

Perhaps something to keep in mind as we create "navtiming3" in Prometheus – T175087.

Anyhow, all other considered metrics for removal have been done so marking this one as resolved.