您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Bot Framework 服务遥测生成的事件Events generated by the Bot Framework Service telemetry

适用于: SDK v4APPLIES TO: SDK v4

通道服务事件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.

CustomEvent:"WaterfallStep"CustomEvent: "WaterfallStep"

记录瀑布对话中的各个步骤。Logs individual steps from a Waterfall Dialog.

CustomEvent:"WaterfallDialogComplete"CustomEvent: "WaterfallDialogComplete"

瀑布对话完成时记录。Logs when a Waterfall Dialog completes.

CustomEvent:"WaterfallDialogCancel"CustomEvent: "WaterfallDialogCancel"

瀑布对话取消时记录。Logs when a Waterfall Dialog is canceled.

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 the TelemetryBotIdInitializer as the session identifier (Temeletry.Context.Session.Id) used within Application Insights.
    • 对应于 Bot Framework 协议定义的聊天 IDCorresponds to the Conversation ID as defined by Bot Framework protocol..
    • 记录的属性名称为 session_idThe property name logged is session_id.
  • 用户标识符User Identifier

    • 使用 Application Insights 时,将从 TelemetryBotIdInitializer 记录此属性,作为在 Application Insights 中使用的用户标识符 (Telemetry.Context.User.Id)。When using Application Insights, this is logged from the TelemetryBotIdInitializer 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_idThe property name logged is user_id.
  • ActivityIDActivityID

    • 使用 Application Insights 时,将从 TelemetryBotIdInitializer 记录此属性作为事件的属性。When using Application Insights, this is logged from the TelemetryBotIdInitializer as a Property to the event.
    • 对应于 Bot Framework 协议定义的活动 IDCorresponds to the Activity ID as defined by Bot Framework protocol..
    • 属性名称为 activityIdThe property name is activityId.
  • 通道标识符Channel Identifier

    • 使用 Application Insights 时,将从 TelemetryBotIdInitializer 记录此属性作为事件的属性。When using Application Insights, this is logged from the TelemetryBotIdInitializer as a Property to the event.
    • 对应于 Bot Framework 协议的通道标识符Corresponds to the Channel Identifier of the Bot Framework protocol.
    • 记录的属性名称为 channelIdThe property name logged is channelId.
  • 活动类型ActivityType

    • 使用 Application Insights 时,将从 TelemetryBotIdInitializer 记录此属性作为事件的属性。When using Application Insights, this is logged from the TelemetryBotIdInitializer as a Property to the event.
    • 对应于 Bot Framework 协议的活动类型Corresponds to the Activity Type of the Bot Framework protocol.
    • 记录的属性名称为 activityTypeThe property name logged is activityType.
  • 文本Text

    • (可选)logPersonalInformation 属性设置为 true 时记录。Optionally logged when the logPersonalInformation property is set to true.
    • 对应于 Bot Framework 协议的活动文本字段。Corresponds to the Activity Text field of the Bot Framework protocol.
    • 记录的属性名称为 textThe property name logged is text.
  • SpeakSpeak

    • (可选)logPersonalInformation 属性设置为 true 时记录。Optionally logged when the logPersonalInformation property is set to true.

    • 对应于 Bot Framework 协议的活动讲述字段。Corresponds to the Activity Speak field of the Bot Framework protocol.

    • 记录的属性名称为 speakThe property name logged is speak.

  • FromIdFromId

    • 对应于 Bot Framework 协议的源标识符字段。Corresponds to the From Identifier field of the Bot Framework protocol.
    • 记录的属性名称为 fromIdThe property name logged is fromId.
  • FromNameFromName

    • (可选)logPersonalInformation 属性设置为 true 时记录。Optionally logged when the logPersonalInformation property is set to true.
    • 对应于 Bot Framework 协议的源名称字段。Corresponds to the From Name field of the Bot Framework protocol.
    • 记录的属性名称为 fromNameThe property name logged is fromName.
  • RecipientIdRecipientId

    • 对应于 Bot Framework 协议的源名称字段。Corresponds to the From Name field of the Bot Framework protocol.
    • 记录的属性名称为 fromNameThe property name logged is fromName.
  • RecipientNameRecipientName

    • 对应于 Bot Framework 协议的源名称字段。Corresponds to the From Name field of the Bot Framework protocol.
    • 记录的属性名称为 fromNameThe property name logged is fromName.
  • ConversationIdConversationId

    • 对应于 Bot Framework 协议的源名称字段。Corresponds to the From Name field of the Bot Framework protocol.
    • 记录的属性名称为 fromNameThe property name logged is fromName.
  • ConversationNameConversationName

    • 对应于 Bot Framework 协议的源名称字段。Corresponds to the From Name field of the Bot Framework protocol.
    • 记录的属性名称为 fromNameThe property name logged is fromName.
  • LocaleLocale

    • 对应于 Bot Framework 协议的源名称字段。Corresponds to the From Name field of the Bot Framework protocol.
    • 记录的属性名称为 fromNameThe property name logged is fromName.

CustomEvent:BotMessageSendCustomEvent: BotMessageSend

记录自: TelemetryLoggerMiddlewareLogged From: TelemetryLoggerMiddleware

当机器人发送消息时记录。Logged when bot sends a message.

CustomEvent:BotMessageUpdateCustomEvent: BotMessageUpdate

记录自: 机器人更新消息(这种情况很少见)时记录的 TelemetryLoggerMiddlewareLogged From: TelemetryLoggerMiddleware Logged when a message is updated by the bot (rare case)

CustomEvent:BotMessageDeleteCustomEvent: BotMessageDelete

记录自: 机器人删除消息(这种情况很少见)时记录的 TelemetryLoggerMiddlewareLogged From: TelemetryLoggerMiddleware Logged when a message is deleted by the bot (rare case)

CustomEvent:LuisEventCustomEvent: LuisEvent

记录自: LuisRecognizerLogged From: LuisRecognizer

记录来自 LUIS 服务的结果。Logs results from LUIS service.

CustomEvent:QnAMessageCustomEvent: QnAMessage

记录自: QnAMakerLogged From: QnAMaker

记录来自 QnA Maker 服务的结果。Logs results from QnA Maker service.