diff --git a/services-js/access-boston/src/server/start.ts b/services-js/access-boston/src/server/start.ts index 9ec825827..dee02e4ee 100644 --- a/services-js/access-boston/src/server/start.ts +++ b/services-js/access-boston/src/server/start.ts @@ -15,10 +15,25 @@ if ( const appInsights = require('applicationinsights'); try { - appInsights.setup().start(); + appInsights + .setup() + .setAutoCollectRequests(true) + .setAutoCollectPerformance(true, true) + .setAutoCollectExceptions(true) + .setAutoCollectDependencies(true) + .setAutoCollectConsole(true, false) + .setUseDiskRetryCaching(true) + .setAutoCollectPreAggregatedMetrics(true) + .setSendLiveMetrics(true) + .setAutoCollectHeartbeat(false) + .setAutoCollectIncomingRequestAzureFunctions(true) + .setInternalLogging(false, true) + .setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C) + .enableWebInstrumentation(false) + .start(); const client = appInsights.defaultClient; - if (client && client.config && client.config.connectionString) { + if (client) { console.log('Application Insights initialized.'); // test that we can send a test trace to Application Insights