Closed
Bug 1341966
Opened 8 years ago
Closed 8 years ago
Fix parsing of FxiOS user-agent strings in FxA metrics export
Categories
(Cloud Services Graveyard :: Metrics: Pipeline, defect, P1)
Cloud Services Graveyard
Metrics: Pipeline
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rfkelly, Unassigned)
Details
There is currently some limited support for handling FxiOS user-agent strings in the FxA metrics export scripts [1], [2]. Unfortunately I don't think it covers all cases, and we've reason to believe that many metrics events from FxiOS are being discarded due to UA parsing errors.
Like Android, FxiOS sends two different user-agent strings, one for the web content that looks like this:
Mozilla/5.0 (iPhone; CPU iPhone OS 10_2 like Mac OS X) AppleWebKit/602.3.12 (KHTML, like Gecko) FxiOS/6.1 Mobile/14C89 Safari/602.3.12
And a different one for the Sync background process, that looks like this:
Firefox-iOS-FxA/6.1 (Fennec (rfk))
Can we please:
* Update the export scripts to support both formats. Ideally both of the above would parse as user_agent_browser=FxiOS and user_agent_version=6.1
* Re-export the FxA retention and flow data in S3 to include the correct UA data, ideally from at least the start of the year.
I'll try to put up a quick PR for the first part, but my lua is great and I'm not sure how to test it in practice.
[1] https://github.com/mozilla-services/puppet-config/blob/master/shared/modules/fxa/files/hekad/lua_outputs/fxa_flow_csv.lua#L145
[2] https://github.com/mozilla-services/puppet-config/blob/master/shared/modules/fxa/files/hekad/lua_outputs/fxa_retention_csv.lua#L121
Reporter | ||
Comment 1•8 years ago
|
||
(Bonus points if we can also get them to show up correctly in the data that goes to Kibana, but I don't know where to find that to investigate)
Reporter | ||
Comment 2•8 years ago
|
||
A work-in-progress PR at https://github.com/mozilla-services/puppet-config/pull/2500
Comment 3•8 years ago
|
||
The fastest thing to do here from a testing perspective is to run the updated outputs in production in parallel to the current ones, but to a different s3 prefix. I'm doing that, and if the output looks good to you :rfkelly I'll cut it over on Monday and work on the backfill as soon as I can. The test data will be available in fxa-{flow,retention}-bz1341966.
Kibana is an entirely different matter and I don't think I have the cycles to look into that.
Reporter | ||
Comment 4•8 years ago
|
||
Thanks :whd, I can confirm that the files under fxa-{flow,retention}-bz1341966 appear as I expect them to, and that we're now seeing flow completion events for iOS sync clients. Please go ahead and merge and backfill with this change.
Comment 5•8 years ago
|
||
I cut over production on Monday UTC, so newly generated data from the 20170228 onward will have the fixed data. I've backfilled from the beginning of the year to 20170227 in s3://net-mozaws-prod-us-west-2-pipeline-analysis/whd/fxa-{flow,retention}-bz1341966. I can copy over the existing objects if that's preferred.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•8 years ago
|
||
> I can copy over the existing objects if that's preferred.
Yes please, I think copying over the existing objects will be simpler for us overall.
Comment 7•8 years ago
|
||
The copy has been completed (yay for being in usw2).
Comment 8•8 years ago
|
||
Actually, I copied the wrong objects. I'm re-running the copy with the correct objects now.
Comment 9•8 years ago
|
||
No, I did copy the correct objects. I was confused by the other fxa flow log bug, but the backfill should have included those changes. A consequence of this is that all the CSVs for this year now have empty locale/uid fields in the flow logs, so maybe some conditional logic can be removed on your end.
Updated•6 years ago
|
Product: Cloud Services → Cloud Services Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•