Track unable to become ready within timeout
Summary: This is currently done by querying the 'console-log' event. Instead, make it type safe and official. Reviewed By: antonk52 Differential Revision: D50927954 fbshipit-source-id: ff767acdc51b942c6deb92ffbfd93288b3367062
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d5a0c206f2
commit
afae1bd141
@@ -110,6 +110,7 @@ export async function startServer(
|
|||||||
}> {
|
}> {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!isReady && isProduction()) {
|
if (!isReady && isProduction()) {
|
||||||
|
tracker.track('server-ready-timeout', {timeout: timeoutSeconds});
|
||||||
console.error(
|
console.error(
|
||||||
`[flipper-server] Unable to become ready within ${timeoutSeconds} seconds, exit`,
|
`[flipper-server] Unable to become ready within ${timeoutSeconds} seconds, exit`,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ type TrackerEvents = {
|
|||||||
'server-socket-already-in-use': {};
|
'server-socket-already-in-use': {};
|
||||||
'server-open-ui': {browser: boolean; hasToken: boolean};
|
'server-open-ui': {browser: boolean; hasToken: boolean};
|
||||||
'server-ws-server-error': {port: number; error: string};
|
'server-ws-server-error': {port: number; error: string};
|
||||||
|
'server-ready-timeout': {timeout: number};
|
||||||
'browser-connection-created': {
|
'browser-connection-created': {
|
||||||
successful: boolean;
|
successful: boolean;
|
||||||
timeMS: number;
|
timeMS: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user