Healthcheck failures analytics

Summary:
Send per-healthcheck success/failure event to be able to analyze most common problems.
Send event when doctor warning bar shown.
Send event when doctor report is opened by user.
Send event when user set flag "Do not show warning again" in the doctor report.

Reviewed By: passy

Differential Revision: D19312127

fbshipit-source-id: 01b648d1154a3aeadc85980190cb9e5e221b572e
This commit is contained in:
Anton Nikolaev
2020-01-10 06:16:48 -08:00
committed by Facebook Github Bot
parent 451db57fa5
commit 2599dffe48
4 changed files with 47 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ export function reportUsage(
getInstance().track('usage', action, data, plugin);
}
function logPlatformSuccessRate(name: string, result: Result) {
export function logPlatformSuccessRate(name: string, result: Result) {
if (result.kind === 'success') {
getInstance().track('success-rate', name, {value: 1});
} else if (result.kind === 'cancelled') {