Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var appInsights = require('applicationinsights');
- var telemetryModule = require('./telemetry-module.js');
- appInsights.setup(process.env.APPINSIGHTS_INSTRUMENTATION_KEY).start();
- var appInsightsClient = new appInsights.TelemetryClient();
- var timesAsked = 0;
- bot.dialog('Greeting', session => {
- session.endDialog('Hi there!');
- appInsightsClient.trackEvent({ name: 'Greeting', properties: session.message.text });
- appInsightsClient.trackMetric({name: 'Number of times asked', properties: timesAsked++});
- }).triggerAction({
- matches: /^hi/i
- });
Add Comment
Please, Sign In to add comment