From T104902#1626842 with @Peter:Have the server fragment our frontend properties by browser_family using the ua-parser library server-side. We can wildcard over this for general graphs, but it allows us to draw a more realistic picture for individual browsers (and help pinpoint problems with specific browsers), since median of everything is not very representative of real users.
Description
Description
Details
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | None | T99060 Create a dashboard of key user-centric metrics | |||
Resolved | Peter | T104902 Refactor Navigation Timing gathering to produce reliable stackable measures (aka "frontend.navtiming2") | |||
Resolved | Krinkle | T112594 Separate frontend.navtiming metrics by browser family |
Event Timeline
Comment Actions
While there, I'd like to request installing it on terbium as well so that we can reliably test and iterate our webperf scripts there before deploying on hafnium (see also T112660).
Comment Actions
BTW, don't forget you can now consume (using eventlogging code or not) JSON directly from the Kafka eventlogging_NavigationTiming topic :)
Comment Actions
Hm, also, this might not be a good idea, but could be worth considering: should eventlogging-processor do this for all client-side events so that the parsed UA is easily available for anyone to use? MAYYYBE maybe not :) Probably would make the processor work much harder ¯\_(ツ)_/¯
Comment Actions
It'd certainly simplify things a bit, but it may be better to merely make it available as a method for subscribers (rather than preprocess ahead of time). That way subscribers like Multimedia and NavTiming could do something like:
import eventlogging events = eventlogging.connect( .. ); for meta in events.filter(schema='Edit', uaMap=True): event = meta['event'] uaMap = meta['uaMap'] print uaMap['browser']['family'] print uaMap['browser']['major']
Though it's hardly advantageous compared to using the library directly:
import eventlogging import user_agent_parser events = eventlogging.connect( .. ); for meta in events.filter(schema='Edit'): event = meta['event'] uaMap = user_agent_parser.parse(meta['userAgent']) print uaMap['user_agent']['family'] print uaMap['user_agent']['major']
The main hurdle is getting uap-python packaged. Whether to install it on hafnium or eventlog1001 shouldn't matter much.
Comment Actions
Change 254355 had a related patch set uploaded (by Ori.livneh):
webperf: log per-user-agent Navigation Timing data
Comment Actions
Change 254355 merged by Ori.livneh:
webperf: log per-user-agent Navigation Timing data
Comment Actions
A few ideas:
- Some of the iOS_%s_WebView and iOS_%s_other entries contain periods in the key segment causing them to clobber the space for Navigation Timing properties.
- Let's break down browsers by version inside family to make it easier to group metrics from the same browser (e.g. navtiming.Chrome_Mobile.46.firstPaint).
- Rename by_platform to by_browser. Also to avoid confusion with the $Platform variable we use for desktop vs mobile.
- Rename the browsers to be more consistent with naming scheme of ua-parser per https://github.com/ua-parser/uap-core/blob/HEAD/regexes.yaml. E.g. "Chrome Mobile" (not Mobile Chrome), "Chrome Mobile iOS" (not CriOS), "Mobile Safari", "Mobile Safari WebView" etc. These names are more familiar to us I think, and also used by Analytics.
- Maybe add a generic "Other" so that we're future-proof against what proportion of browsers is outside the ones we have regexes for.
Comment Actions
Change 271307 had a related patch set uploaded (by Krinkle):
navtiming: Improve parse_ua and add unit tests
Comment Actions
Data is now in Graphite.
Created dashboard at https://grafana.wikimedia.org/dashboard/db/navigation-timing-by-browser.