Upgrade appinsights (#58999)

* Upgrade appinsights

* Env, global updates before starting shared process

* Disable console logging from appinsights Fixes #55417

* Move workaround to helper
This commit is contained in:
Ramya Rao
2018-09-22 23:09:48 -07:00
committed by GitHub
parent d5d8d98cf3
commit ae526292df
10 changed files with 330 additions and 132 deletions

11
src/bootstrap.js vendored
View File

@@ -217,4 +217,15 @@ exports.configurePortable = function () {
isPortable
};
};
//#endregion
//#region ApplicationInsights
/**
* Prevents appinsights from monkey patching modules.
* This should be called before importing the applicationinsights module
*/
exports.avoidMonkeyPatchFromAppInsights = function () {
process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'] = true; // Skip monkey patching of 3rd party modules by appinsights
global['diagnosticsSource'] = {}; // Prevents diagnostic channel (which patches "require") from initializing entirely
};
//#endregion