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:
committed by
Facebook GitHub Bot
parent
fecaa8d974
commit
8f1b4ffa1c
@@ -47,6 +47,7 @@ type TrackerEvents = {
|
|||||||
error?: string;
|
error?: string;
|
||||||
};
|
};
|
||||||
'server-socket-already-in-use': {};
|
'server-socket-already-in-use': {};
|
||||||
|
'server-open-ui': {browser: boolean; hasToken: boolean};
|
||||||
'browser-connection-created': {
|
'browser-connection-created': {
|
||||||
successful: boolean;
|
successful: boolean;
|
||||||
timeMS: number;
|
timeMS: number;
|
||||||
|
|||||||
@@ -313,6 +313,11 @@ async function launch() {
|
|||||||
console.info(`[flipper-server] Go to: ${chalk.blue(url.toString())}`);
|
console.info(`[flipper-server] Go to: ${chalk.blue(url.toString())}`);
|
||||||
|
|
||||||
open(url.toString(), {app: {name: open.apps.chrome}});
|
open(url.toString(), {app: {name: open.apps.chrome}});
|
||||||
|
|
||||||
|
tracker.track('server-open-ui', {
|
||||||
|
browser: true,
|
||||||
|
hasToken: token?.length != 0,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (argv.bundler) {
|
if (argv.bundler) {
|
||||||
@@ -320,6 +325,10 @@ async function launch() {
|
|||||||
} else {
|
} else {
|
||||||
const path = await findInstallation();
|
const path = await findInstallation();
|
||||||
if (path) {
|
if (path) {
|
||||||
|
tracker.track('server-open-ui', {
|
||||||
|
browser: false,
|
||||||
|
hasToken: token?.length != 0,
|
||||||
|
});
|
||||||
open(path);
|
open(path);
|
||||||
} else {
|
} else {
|
||||||
await openInBrowser();
|
await openInBrowser();
|
||||||
|
|||||||
Reference in New Issue
Block a user