Skip to content

Commit a8c59b2

Browse files
committed
Add App Insights
1 parent 5820650 commit a8c59b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

GetRecipes/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
const recipes = require('../shared/recipe.service');
2+
const appInsights = require('applicationinsights');
3+
appInsights.setup();
4+
const context = appInsights.defaultClient.context;
5+
context.tags[context.keys.cloudRole] = 'backend';
6+
appInsights.start();
27
module.exports = async function(context, req) {
38
context.log('JavaScript HTTP trigger function processed a request.');
49
const SIZE = 10;

0 commit comments

Comments
 (0)