本文整理汇总了TypeScript中botbuilder-instrumentation.BotFrameworkInstrumentation.monitor方法的典型用法代码示例。如果您正苦于以下问题:TypeScript BotFrameworkInstrumentation.monitor方法的具体用法?TypeScript BotFrameworkInstrumentation.monitor怎么用?TypeScript BotFrameworkInstrumentation.monitor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类botbuilder-instrumentation.BotFrameworkInstrumentation
的用法示例。
在下文中一共展示了BotFrameworkInstrumentation.monitor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: createLocalizedDialog
function createLocalizedDialog(locale: string, instrumentation: BotFrameworkInstrumentation): IntentDialog {
const recognizer = createRecognizer(locale);
instrumentation.monitor(null, recognizer);
return new IntentDialog({ recognizers: [recognizer] })
.onBegin(onBegin)
.matches('confirmation.yes', onYes)
.matches('confirmation.no', onNo)
.matches('command.cancel', onCancel)
.onDefault(onUnknown(instrumentation));
}
示例2: setupInstrumentation
private setupInstrumentation() {
this.use({
botbuilder: logger.onMessageReceived,
send: logger.onMessageSent
});
this.instrumentation = new BotFrameworkInstrumentation({
instrumentationKey: config.get('BotDevAppInsightsKey'),
sentiments: {
key: config.get('CG_SENTIMENT_KEY')
},
autoLogOptions: {
autoCollectExceptions: true
}
});
this.instrumentation.monitor(this);
}