commit | dd52fddccd4c5ca03172fc7c6f2fa14dc7137692 | [log] [tgz] |
---|---|---|
author | Primiano Tucci <primiano@google.com> | Tue Feb 09 18:10:58 2021 +0100 |
committer | Primiano Tucci <primiano@google.com> | Tue Feb 09 18:10:58 2021 +0100 |
tree | e007f0e99d2b8d429633ac9e760117ce77e8bb96 | |
parent | c8be681dbaa6625f925aee36460a179940f77227 [diff] |
UI: Fix GA My previous change (aosp/1538264) broke analytics. This is because the semantic of the special "arguments" are different between a lambda and a function. In the process of doing so, I discovered other bugs: Problem: GA was initialized only after the user clicked on some sidebar URL. The problem was that the initial redraw() call didn't call setRouteOnHash() because state.route is still null there. This means that we were missing analytics for most people who opened a trace via internal dashboards and did stay within the timeline viewer (likely most of them). Fix: trigger an updatePath() at initialization time. Problem: the isInternalUser dimension was flaky, as it could be set after GA is initialized, depending on script execution order. Fix: init GA after the script that sets isInternalUser either succeeds or fails. Problem: the isInternalUser detection was flaky. This seems related with the state of SSO cookies. If the UI is opened when starting a fresh browser, the requests fails. But then succeeds after opening corp gmail. Fix: make isInternalUser sticky in via localStorage. Problem: GA errors were detectable only on the production/staging URLs. This is because the UI was explicitly listing only them, leaving localhost out. This makes harder to spot problems early. Fix: add localhost to the set of allowed origins. Bug: 143973344 Test: manual via https://tagassistant.google.com/ Change-Id: Id074d9ab13e4cb454cacd24adb5b55e2b7668337
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.