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
This commit is contained in:
parent
a02c238464
commit
46e47aaecd
|
@ -510,6 +510,16 @@ class Server {
|
||||||
const deps = bundleDeps.get(bundle);
|
const deps = bundleDeps.get(bundle);
|
||||||
const {dependencyPairs, files, idToIndex, outdated} = deps;
|
const {dependencyPairs, files, idToIndex, outdated} = deps;
|
||||||
if (outdated.size) {
|
if (outdated.size) {
|
||||||
|
const updateExistingBundleEventId =
|
||||||
|
Activity.startEvent(
|
||||||
|
'Updating existing bundle',
|
||||||
|
{
|
||||||
|
outdatedModules: outdated.size,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
telemetric: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
debug('Attempt to update existing bundle');
|
debug('Attempt to update existing bundle');
|
||||||
const changedModules =
|
const changedModules =
|
||||||
Array.from(outdated, this.getModuleForPath, this);
|
Array.from(outdated, this.getModuleForPath, this);
|
||||||
|
@ -565,6 +575,7 @@ class Server {
|
||||||
|
|
||||||
bundle.invalidateSource();
|
bundle.invalidateSource();
|
||||||
debug('Successfully updated existing bundle');
|
debug('Successfully updated existing bundle');
|
||||||
|
Activity.endEvent(updateExistingBundleEventId);
|
||||||
return bundle;
|
return bundle;
|
||||||
});
|
});
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
|
Loading…
Reference in New Issue