Track proxy errors

Summary:
Need to answer:
- Proxy errors rate over time

Reviewed By: antonk52

Differential Revision: D46219927

fbshipit-source-id: 1ad8cc60303ed3aa34828b9ff87009ff7754a146
This commit is contained in:
Lorenzo Blasa
2023-05-26 08:02:12 -07:00
committed by Facebook GitHub Bot
parent 6936cb34ac
commit 29510f66c8
2 changed files with 2 additions and 2 deletions

View File

@@ -212,8 +212,7 @@ async function startProxyServer(
res.writeHead(502, 'Failed to proxy request');
}
res.end('Failed to proxy request: ' + err);
// TODO: should exit as proxying requests will continue to fail.
// TODO: track these instances.
tracker.track('server-proxy-error', {error: err.message});
});
return new Promise((resolve) => {

View File

@@ -16,6 +16,7 @@ type TrackerEvents = {
error?: string;
};
'server-socket-already-in-use': {};
'server-proxy-error': {error: string};
};
class ServerCoreTracker {