From 09b88a759c4dd3d67cee807abe2bbedefba4d0ef Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Thu, 23 Mar 2017 13:18:42 -0700 Subject: [PATCH] [client-app] Consolidate file download metric reporting Summary: See title Test Plan: manual Reviewers: gleb, mark Reviewed By: mark Differential Revision: https://phab.nylas.com/D4256 --- packages/client-app/src/flux/stores/file-download-store.es6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client-app/src/flux/stores/file-download-store.es6 b/packages/client-app/src/flux/stores/file-download-store.es6 index bd25d7e34..6231d13d7 100644 --- a/packages/client-app/src/flux/stores/file-download-store.es6 +++ b/packages/client-app/src/flux/stores/file-download-store.es6 @@ -105,10 +105,11 @@ export class Download { const onFailed = (err) => { Actions.recordPerfMetric({ - action: 'file-download-failed', + action: 'file-download', accountId: this.accountId, actionTimeMs: Date.now() - before, maxValue: 10 * 60 * 1000, + succeeded: false, }) this.request = null; stream.end(); @@ -127,10 +128,11 @@ export class Download { const onSuccess = () => { Actions.recordPerfMetric({ - action: 'file-download-succeeded', + action: 'file-download', accountId: this.accountId, actionTimeMs: Date.now() - before, maxValue: 10 * 60 * 1000, + succeeded: true, }) this.request = null; stream.end();