From dd4722161ec8db80686f01a2d14c61779f139767 Mon Sep 17 00:00:00 2001 From: Ovidiu Viorel Iepure Date: Thu, 1 Sep 2016 11:11:38 -0700 Subject: [PATCH] Telemetry for update bundle event Summary: Updating an existing bundle is now logged as a telemetric event. Reviewed By: davidaurelio Differential Revision: D3804754 fbshipit-source-id: adab3b054a161bd9535ad01d52573fb7bb177d43 --- react-packager/src/Server/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/react-packager/src/Server/index.js b/react-packager/src/Server/index.js index aa4e3279..164b0e13 100644 --- a/react-packager/src/Server/index.js +++ b/react-packager/src/Server/index.js @@ -510,6 +510,16 @@ class Server { const deps = bundleDeps.get(bundle); const {dependencyPairs, files, idToIndex, outdated} = deps; if (outdated.size) { + const updateExistingBundleEventId = + Activity.startEvent( + 'Updating existing bundle', + { + outdatedModules: outdated.size, + }, + { + telemetric: true, + }, + ); debug('Attempt to update existing bundle'); const changedModules = Array.from(outdated, this.getModuleForPath, this); @@ -565,6 +575,7 @@ class Server { bundle.invalidateSource(); debug('Successfully updated existing bundle'); + Activity.endEvent(updateExistingBundleEventId); return bundle; }); }).catch(e => {