Track UI launches

Summary: This is currently done by querying the 'console-log' event. Instead, make it type safe and official.

Reviewed By: antonk52

Differential Revision: D50927713

fbshipit-source-id: 780c0f158bf8bdaa6d009035a0cee62c7828f479
This commit is contained in:
Lorenzo Blasa
2023-11-02 10:42:15 -07:00
committed by Facebook GitHub Bot
parent fecaa8d974
commit 8f1b4ffa1c
2 changed files with 10 additions and 0 deletions

View File

@@ -313,6 +313,11 @@ async function launch() {
console.info(`[flipper-server] Go to: ${chalk.blue(url.toString())}`);
open(url.toString(), {app: {name: open.apps.chrome}});
tracker.track('server-open-ui', {
browser: true,
hasToken: token?.length != 0,
});
};
if (argv.bundler) {
@@ -320,6 +325,10 @@ async function launch() {
} else {
const path = await findInstallation();
if (path) {
tracker.track('server-open-ui', {
browser: false,
hasToken: token?.length != 0,
});
open(path);
} else {
await openInBrowser();