Skip to content

Commit 61faadf

Browse files
committed
feat: connect to appinsights
1 parent efac60a commit 61faadf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/server/src/index.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ import helmet from 'koa-helmet';
33
import send from 'koa-send';
44
import serve from 'koa-static';
55
import path from 'path';
6-
import { setup } from 'applicationinsights';
6+
import * as appInsights from 'applicationinsights';
77

88
import { config } from './config';
99
import { logger } from './logging';
1010
import { routes } from './routes/index';
1111

1212
if (config.appInsightsConnectionString) {
13-
setup(config.appInsightsConnectionString).start();
13+
appInsights
14+
.setup(config.appInsightsConnectionString)
15+
.setAutoCollectConsole(true, true)
16+
.enableWebInstrumentation(true)
17+
.start();
1418
}
1519

1620
const app = new Koa();

0 commit comments

Comments
 (0)