您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.
Bot Framework 服务遥测生成的事件Events generated by the Bot Framework Service telemetry
通道服务事件Channel service events
除 WaterfallDialog
(已在遥测主题中讨论,可以从机器人代码生成事件)以外,Bot Framework 通道服务还会记录事件。In addition to WaterfallDialog
, which was discussed in the telemetry topic and which generates events from your bot code, the Bot Framework Channel service also logs events. 这可以帮助你诊断通道问题或整个机器人的故障。This helps you diagnose issues with Channels or overall bot failures.
CustomEvent:"Activity"CustomEvent: "Activity"
记录自: 收到消息时由通道服务记录的通道服务。Logged From: Channel Service Logged by the Channel Service when a message received.
异常:"Bot Errors"Exception: "Bot Errors"
记录自: 调用机器人时由通道记录的通道服务返回非 2XX Http 响应。Logged From: Channel Service Logged by the channel when a call to the Bot returns a non-2XX Http Response.
CustomEvent:"WaterfallStart"CustomEvent: "WaterfallStart"
当 WaterfallDialog 启动时,将记录 WaterfallStart
事件。When a WaterfallDialog begins, a WaterfallStart
event is logged.
user_id
(从遥测初始化表达式)user_id
(From Telemetry Initializer)session_id
(从遥测初始化表达式)session_id
(From Telemetry Initializer)customDimensions.activityId
(从遥测初始化表达式)customDimensions.activityId
(From Telemetry Initializer)customDimensions.activityType
(从遥测初始化表达式)customDimensions.activityType
(From Telemetry Initializer)customDimensions.channelId
(从遥测初始化表达式)customDimensions.channelId
(From Telemetry Initializer)customDimensions.DialogId
(这是传入瀑布中的 dialogId(字符串)。customDimensions.DialogId
(This is the dialogId (string) passed into your Waterfall. 可将其视为“瀑布类型”)You can consider this the "waterfall type")customDimensions.InstanceID
(对于每个对话实例是唯一的)customDimensions.InstanceID
(unique per instance of the dialog)
CustomEvent:"WaterfallStep"CustomEvent: "WaterfallStep"
记录瀑布对话中的各个步骤。Logs individual steps from a Waterfall Dialog.
user_id
(从遥测初始化表达式)user_id
(From Telemetry Initializer)session_id
(从遥测初始化表达式)session_id
(From Telemetry Initializer)customDimensions.activityId
(从遥测初始化表达式)customDimensions.activityId
(From Telemetry Initializer)customDimensions.activityType
(从遥测初始化表达式)customDimensions.activityType
(From Telemetry Initializer)customDimensions.channelId
(从遥测初始化表达式)customDimensions.channelId
(From Telemetry Initializer)customDimensions.DialogId
(这是传入瀑布中的 dialogId(字符串)。customDimensions.DialogId
(This is the dialogId (string) passed into your Waterfall. 可将其视为“瀑布类型”)You can consider this the "waterfall type")customDimensions.StepName
(方法名称,使用 lambda 时为StepXofY
)customDimensions.StepName
(either method name orStepXofY
if lambda)customDimensions.InstanceID
(对于每个对话实例是唯一的)customDimensions.InstanceID
(unique per instance of the dialog)
CustomEvent:"WaterfallDialogComplete"CustomEvent: "WaterfallDialogComplete"
瀑布对话完成时记录。Logs when a Waterfall Dialog completes.
user_id
(从遥测初始化表达式)user_id
(From Telemetry Initializer)session_id
(从遥测初始化表达式)session_id
(From Telemetry Initializer)customDimensions.activityId
(从遥测初始化表达式)customDimensions.activityId
(From Telemetry Initializer)customDimensions.activityType
(从遥测初始化表达式)customDimensions.activityType
(From Telemetry Initializer)customDimensions.channelId
(从遥测初始化表达式)customDimensions.channelId
(From Telemetry Initializer)customDimensions.DialogId
(这是传入瀑布中的 dialogId(字符串)。customDimensions.DialogId
(This is the dialogId (string) passed into your Waterfall. 可将其视为“瀑布类型”)You can consider this the "waterfall type")customDimensions.InstanceID
(对于每个对话实例是唯一的)customDimensions.InstanceID
(unique per instance of the dialog)
CustomEvent:"WaterfallDialogCancel"CustomEvent: "WaterfallDialogCancel"
瀑布对话取消时记录。Logs when a Waterfall Dialog is canceled.
user_id
(从遥测初始化表达式)user_id
(From Telemetry Initializer)session_id
(从遥测初始化表达式)session_id
(From Telemetry Initializer)customDimensions.activityId
(从遥测初始化表达式)customDimensions.activityId
(From Telemetry Initializer)customDimensions.activityType
(从遥测初始化表达式)customDimensions.activityType
(From Telemetry Initializer)customDimensions.channelId
(从遥测初始化表达式)customDimensions.channelId
(From Telemetry Initializer)customDimensions.DialogId
(这是传入瀑布中的 dialogId(字符串)。customDimensions.DialogId
(This is the dialogId (string) passed into your Waterfall. 可将其视为“瀑布类型”)You can consider this the "waterfall type")customDimensions.StepName
(方法名称,使用 lambda 时为StepXofY
)customDimensions.StepName
(either method name orStepXofY
if lambda)customDimensions.InstanceID
(对于每个对话实例是唯一的)customDimensions.InstanceID
(unique per instance of the dialog)
CustomEvent:BotMessageReceivedCustomEvent: BotMessageReceived
当机器人收到用户的新消息时记录。Logged when bot receives new message from a user.
如果不重写,将使用 Microsoft.Bot.Builder.IBotTelemetry.TrackEvent()
方法从 Microsoft.Bot.Builder.TelemetryLoggerMiddleware
记录此事件。When not overridden, this event is logged from Microsoft.Bot.Builder.TelemetryLoggerMiddleware
using the Microsoft.Bot.Builder.IBotTelemetry.TrackEvent()
method.
会话标识符Session Identifier
- 使用 Application Insights 时,将从
TelemetryBotIdInitializer
记录此属性,作为在 Application Insights 中使用的会话标识符 (Temeletry.Context.Session.Id)。When using Application Insights, this is logged from theTelemetryBotIdInitializer
as the session identifier (Temeletry.Context.Session.Id) used within Application Insights. - 对应于 Bot Framework 协议定义的聊天 ID。Corresponds to the Conversation ID as defined by Bot Framework protocol..
- 记录的属性名称为
session_id
。The property name logged issession_id
.
- 使用 Application Insights 时,将从
用户标识符User Identifier
- 使用 Application Insights 时,将从
TelemetryBotIdInitializer
记录此属性,作为在 Application Insights 中使用的用户标识符 (Telemetry.Context.User.Id)。When using Application Insights, this is logged from theTelemetryBotIdInitializer
as the user identifier (Telemetry.Context.User.Id) used within Application Insights. - 此属性的值是 Bot Framework 协议定义的通道标识符与用户 ID(连接在一起)属性的组合。The value of this property is a combination of the Channel Identifier and the User ID (concatenated together) properties as defined by the Bot Framework protocol.
- 记录的属性名称为
user_id
。The property name logged isuser_id
.
- 使用 Application Insights 时,将从
ActivityIDActivityID
- 使用 Application Insights 时,将从
TelemetryBotIdInitializer
记录此属性作为事件的属性。When using Application Insights, this is logged from theTelemetryBotIdInitializer
as a Property to the event. - 对应于 Bot Framework 协议定义的活动 ID。Corresponds to the Activity ID as defined by Bot Framework protocol..
- 属性名称为
activityId
。The property name isactivityId
.
- 使用 Application Insights 时,将从
通道标识符Channel Identifier
- 使用 Application Insights 时,将从
TelemetryBotIdInitializer
记录此属性作为事件的属性。When using Application Insights, this is logged from theTelemetryBotIdInitializer
as a Property to the event. - 对应于 Bot Framework 协议的通道标识符。Corresponds to the Channel Identifier of the Bot Framework protocol.
- 记录的属性名称为
channelId
。The property name logged ischannelId
.
- 使用 Application Insights 时,将从
活动类型ActivityType
- 使用 Application Insights 时,将从
TelemetryBotIdInitializer
记录此属性作为事件的属性。When using Application Insights, this is logged from theTelemetryBotIdInitializer
as a Property to the event. - 对应于 Bot Framework 协议的活动类型。Corresponds to the Activity Type of the Bot Framework protocol.
- 记录的属性名称为
activityType
。The property name logged isactivityType
.
- 使用 Application Insights 时,将从
文本Text
- (可选) 将
logPersonalInformation
属性设置为true
时记录。Optionally logged when thelogPersonalInformation
property is set totrue
. - 对应于 Bot Framework 协议的活动文本字段。Corresponds to the Activity Text field of the Bot Framework protocol.
- 记录的属性名称为
text
。The property name logged istext
.
- (可选) 将
SpeakSpeak
(可选) 将
logPersonalInformation
属性设置为true
时记录。Optionally logged when thelogPersonalInformation
property is set totrue
.对应于 Bot Framework 协议的活动讲述字段。Corresponds to the Activity Speak field of the Bot Framework protocol.
记录的属性名称为
speak
。The property name logged isspeak
.
FromIdFromId
- 对应于 Bot Framework 协议的源标识符字段。Corresponds to the From Identifier field of the Bot Framework protocol.
- 记录的属性名称为
fromId
。The property name logged isfromId
.
FromNameFromName
RecipientIdRecipientId
RecipientNameRecipientName
ConversationIdConversationId
ConversationNameConversationName
LocaleLocale
CustomEvent:BotMessageSendCustomEvent: BotMessageSend
记录自: TelemetryLoggerMiddlewareLogged From: TelemetryLoggerMiddleware
当机器人发送消息时记录。Logged when bot sends a message.
- UserID(从遥测初始化表达式)UserID (From Telemetry Initializer)
- SessionID(从遥测初始化表达式)SessionID (From Telemetry Initializer)
- ActivityID(从遥测初始化表达式)ActivityID (From Telemetry Initializer)
- Channel(从遥测初始化表达式)Channel (From Telemetry Initializer)
- ActivityType(从遥测初始化表达式)ActivityType (From Telemetry Initializer)
- ReplyToIDReplyToID
- RecipientIdRecipientId
- ConversationNameConversationName
- LocaleLocale
- RecipientName(对于 PII 是可选的)RecipientName (Optional for PII)
- Text(对于 PII 是可选的)Text (Optional for PII)
- Speak(对于 PII 是可选的)Speak (Optional for PII)
CustomEvent:BotMessageUpdateCustomEvent: BotMessageUpdate
记录自: 机器人更新消息(这种情况很少见)时记录的 TelemetryLoggerMiddlewareLogged From: TelemetryLoggerMiddleware Logged when a message is updated by the bot (rare case)
- UserID(从遥测初始化表达式)UserID (From Telemetry Initializer)
- SessionID(从遥测初始化表达式)SessionID (From Telemetry Initializer)
- ActivityID(从遥测初始化表达式)ActivityID (From Telemetry Initializer)
- Channel(从遥测初始化表达式)Channel (From Telemetry Initializer)
- ActivityType(从遥测初始化表达式)ActivityType (From Telemetry Initializer)
- RecipientIdRecipientId
- ConversationIdConversationId
- ConversationNameConversationName
- LocaleLocale
- Text(对于 PII 是可选的)Text (Optional for PII)
CustomEvent:BotMessageDeleteCustomEvent: BotMessageDelete
记录自: 机器人删除消息(这种情况很少见)时记录的 TelemetryLoggerMiddlewareLogged From: TelemetryLoggerMiddleware Logged when a message is deleted by the bot (rare case)
- UserID(从遥测初始化表达式)UserID (From Telemetry Initializer)
- SessionID(从遥测初始化表达式)SessionID (From Telemetry Initializer)
- ActivityID(从遥测初始化表达式)ActivityID (From Telemetry Initializer)
- Channel(从遥测初始化表达式)Channel (From Telemetry Initializer)
- ActivityType(从遥测初始化表达式)ActivityType (From Telemetry Initializer)
- RecipientIdRecipientId
- ConversationIdConversationId
- ConversationNameConversationName
CustomEvent:LuisEventCustomEvent: LuisEvent
记录自: LuisRecognizerLogged From: LuisRecognizer
记录来自 LUIS 服务的结果。Logs results from LUIS service.
- UserID(从遥测初始化表达式)UserID (From Telemetry Initializer)
- SessionID(从遥测初始化表达式)SessionID (From Telemetry Initializer)
- ActivityID(从遥测初始化表达式)ActivityID (From Telemetry Initializer)
- Channel(从遥测初始化表达式)Channel (From Telemetry Initializer)
- ActivityType(从遥测初始化表达式)ActivityType (From Telemetry Initializer)
- ApplicationIdApplicationId
- IntentIntent
- IntentScoreIntentScore
- Intent2Intent2
- IntentScore2IntentScore2
- FromIdFromId
- SentimentLabelSentimentLabel
- SentimentScoreSentimentScore
- Entities(JSON 格式)Entities (as json)
- Question(对于 PII 是可选的)Question (Optional for PII)
CustomEvent:QnAMessageCustomEvent: QnAMessage
记录自: QnAMakerLogged From: QnAMaker
记录来自 QnA Maker 服务的结果。Logs results from QnA Maker service.
- UserID(从遥测初始化表达式)UserID (From Telemetry Initializer)
- SessionID(从遥测初始化表达式)SessionID (From Telemetry Initializer)
- ActivityID(从遥测初始化表达式)ActivityID (From Telemetry Initializer)
- Channel(从遥测初始化表达式)Channel (From Telemetry Initializer)
- ActivityType(从遥测初始化表达式)ActivityType (From Telemetry Initializer)
- Username(对于 PII 是可选的)Username (Optional for PII)
- Question(对于 PII 是可选的)Question (Optional for PII)
- MatchedQuestionMatchedQuestion
- QuestionIdQuestionId
- AnswerAnswer
- ScoreScore
- ArticleFoundArticleFound