Indicate whether a UMA/UKM record was recorded in chrome custom tabs. |
||||
Issue descriptionIn UMA, we record a histogram CustomTabs.Visible to know whether Chrome was running in custom tabs mode. This allows us to infer whether a given UMA record should be attributed to CCT when doing analysis. We'd like to record a similar signal in UKM. Given that UMA and UKM both use SystemProfileProto, it seems like adding a field to that proto to indicate whether chrome was running in CCT mode would be the best path forward. The main open question is whether Chrome can run in both CCT and non-CCT mode over the course of a UKM or UMA record being cut. If that's the case, we may want to consider more fine grained reporting on the UKM side, such as recording whether a given page load was loaded in CCT or non-CCT mode.
,
Aug 14 2017
,
Aug 14 2017
So for UMA, we cut a new UMA log every when on backgrounded, so entering custom tab mode will be in a different UMA log than the one for regular Chrome. I believe UKM doesn't currently use the foreground/background lifecycle to cut logs - so I think this will need to be done too like UMA to have the field properly reflect the status.
,
Aug 14 2017
Would you consider the flag "custom tab" to be part of the "source" or part of the "report"? I'm thinking "source"...
,
Aug 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/62dffb8d0ad9eb4c37cd5522efcef46917f14a66 commit 62dffb8d0ad9eb4c37cd5522efcef46917f14a66 Author: Brian White <bcwhite@chromium.org> Date: Tue Aug 29 20:56:12 2017 Track Android custom tabs in UKM. Bug: 726338 Change-Id: I444f4e37ef585c95fd26c2db49be2737c13b3789 Reviewed-on: https://chromium-review.googlesource.com/626376 Reviewed-by: Alexei Svitkine (very slow) <asvitkine@chromium.org> Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Commit-Queue: Brian White <bcwhite@chromium.org> Cr-Commit-Position: refs/heads/master@{#498223} [modify] https://crrev.com/62dffb8d0ad9eb4c37cd5522efcef46917f14a66/chrome/browser/android/feature_utilities.cc [modify] https://crrev.com/62dffb8d0ad9eb4c37cd5522efcef46917f14a66/components/metrics/proto/ukm/source.proto [modify] https://crrev.com/62dffb8d0ad9eb4c37cd5522efcef46917f14a66/components/ukm/ukm_source.cc [modify] https://crrev.com/62dffb8d0ad9eb4c37cd5522efcef46917f14a66/components/ukm/ukm_source.h
,
Aug 29 2017
RE: comment #3, I think we persist and flush UKM records when backgrounded on Android using same logic as UMA. So hopefully we should be covered here.
,
Aug 29 2017
Only question I have - are we sure that the SetCustomTabVisible callback is synchronized relative to the onPause/onResume Android calls? If callback ordering ever gets inverted then it seems like we could log the wrong boolean value in each UMA/UKM record.
,
Aug 30 2017
It's set with every onResume call so every activity change should set it correctly. There's always the possibility that something could continue running in the background from a custom tab after a normal tab got loaded, or vice-versa, but that seems so unlikely that it would get lost in the noise.
,
Sep 1 2017
,
Sep 7 2017
Brian was there any more work to be done on this? I queried the logs and I'm seeing some data having CCT marked as true. So I believe we can close this?
,
Sep 7 2017
Yes. This was submitted before the recent beta cut so will be part of M62. |
||||
►
Sign in to add a comment |
||||
Comment 1 by bcwh...@chromium.org
, Aug 14 2017Owner: bcwh...@chromium.org
Status: Assigned (was: Untriaged)
Summary: Indicate whether a UMA/UKM record was recorded in chrome custom tabs. (was: indicate whether a UMA/UKM record was recorded in chrome custom tabs)