Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Force saner ua_os in flow_metadata and activity_events tables #69

Closed
philbooth opened this issue Apr 3, 2017 · 3 comments
Closed

Force saner ua_os in flow_metadata and activity_events tables #69

philbooth opened this issue Apr 3, 2017 · 3 comments
Assignees

Comments

@philbooth
Copy link
Contributor

philbooth commented Apr 3, 2017

The values for ua_os in our metrics tables come from common_log_format.normalize_user_agent in mozilla-services/lua_sandbox_extensions, where they're defined in ua_os_matchers like so:

local ua_os_matchers = {
    -- search, replace
      {"iPod"                    ,"iPod"         }
    , {"iPad"                    ,"iPad"         }
    , {"iPhone"                  ,"iPhone"       }
    , {"Android"                 ,"Android"      }
    , {"BlackBerry"              ,"BlackBerry"   }
    , {"Linux"                   ,"Linux"        }
    , {"Macintosh"               ,"Macintosh"    }
    , {"Mozilla/5.0 (Mobile;"    ,"FirefoxOS"    }
    --http://en.wikipedia.org/wiki/Microsoft_Windows#Timeline_of_releases
    , {"Windows NT 10.0"         ,"Windows 10"   }
    , {"Windows NT 6.3"          ,"Windows 8.1"  }
    , {"Windows NT 6.2"          ,"Windows 8"    }
    , {"Windows NT 6.1"          ,"Windows 7"    }
    , {"Windows NT 6.0"          ,"Windows Vista"}
    , {"Windows NT 5.1"          ,"Windows XP"   }
    , {"Windows NT 5.0"          ,"Windows 2000" }
}

We could simplify our queries if we updated the iPad/iPhone/iPod ones to iOS and all the Windows ones to Windows. This could be done in the update parts of the respective import scripts, with a one-off query to update all the historical data.

@philbooth philbooth self-assigned this Apr 3, 2017
@rfk
Copy link
Contributor

rfk commented Apr 12, 2017

/cc @davismtl; would you worry if we lost the distinction between e.g. "Windows 10" and "Windows 8" in these metrics?

@davismtl
Copy link

Yeah, I would a bit. For example, onboarding team is running tests on just Win 10 since it has become largest population. It's nice to isolate it.

Question is... could we do something like?
OS: Windows
Version: 10
Device type: PC

or

OS: iOS
Version: 9.2
Device type: iPhone

I think that as a result we could simplify most queries but if we wanted the granularity, it would be there. (thinking out loud)

Thoughts?

@philbooth
Copy link
Contributor Author

Closing this, based on the Alex's last comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants