Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(instrumentationKey, disable?: boolean) {
try {
this._disable = disable;
this._current = AppInsights.setup(instrumentationKey).start().client;
if (!this._disable) {
AppInsights.enableVerboseLogging();
}
} catch (e) {
console.error('Could not initialize AppInsights.');
}
}