From 46e47aaecd79df529b27a68f45f3db2ba9fcf9f8 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 --- packager/react-packager/src/Server/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packager/react-packager/src/Server/index.js b/packager/react-packager/src/Server/index.js index aa4e3279c..164b0e13e 100644 --- a/packager/react-packager/src/Server/index.js +++ b/packager/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 => {