【问题标题】:QnAMaker Telemetry customevents data is nullQnAMaker Telemetry customevents 数据为空
【发布时间】:2021-11-12 09:35:05
【问题描述】:

我正在尝试使用 QnAMaker 的 Application Insights 登录 Azure 门户。我注意到每个表中与 customEvents 字段关联的所有数据都是空的:

Query results

这是我在 Azure 的查询编辑器中使用的查询,位于 Application Insight 的日志中:

requests |project
ActivityId = customDimensions.activityId, 
ActivityType = customDimensions.activityType,
ChannelId = customDimensions.channelId  , 
ConversationId = session_Id ,
ReplyActivityId = customDimensions.replyActivityId , 
FromId = customDimensions.fromId , 
Locale = customDimensions.locale  ,
RecipientId = customDimensions.recipientId,  
Speak = customDimensions.speak ,  
Text =    customDimensions.text,
EventName = name, 
Time = timestamp, 
Date = timestamp,
DialogInstanceId = customDimensions.InstanceId,
DialogId = customDimensions.DialogId  , 
DialogStepName = customDimensions.StepName,
Luis_ApplicationId = customDimensions.applicationId,
Luis_Intent = customDimensions.intent,
Luis_IntentScore = customDimensions.intentScore,
Luis_Entities = customDimensions.entities,
Luis_Question = customDimensions.question,
Luis_SentimentLabel = customDimensions.sentimentLabel,
Luis_SentimentScore = customDimensions.sentimentScore,
QnA_KnowledgeBaseId = customDimensions.knowledgeBaseId,
QnA_Answer = customDimensions.answer,
QnA_ArticleFound = customDimensions.articleFound,
QnA_OriginalQuestion = customDimensions.originalQuestion,
QnA_Question = customDimensions.question,
QnA_QuestionId = customDimensions.questionId,
QnA_Score = customDimensions.score,
QnA_UserName = customDimensions.username,
User_City = client_City, 
User_State = client_StateOrProvince, 
User_Country = client_CountryOrRegion,
Feedback_Value = customDimensions.Feedback,
Feedback_Comment = customDimensions.Comment,
Feedback_Tag = customDimensions.Tag

所有 customDimensions.____ 数据均为空。如何调整我的 QnAMaker 代码来记录这些数据?

这里是 QnAMaker 被实例化的地方:

using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.AI.QnA;
using Microsoft.Extensions.Configuration;
using System.Net.Http;

namespace Microsoft.BotBuilderSamples
{
    public class BotServices : IBotServices
    {
        private readonly IHttpClientFactory _httpClientFactory;
        private readonly IBotTelemetryClient _telemetryClient;

        public BotServices(IConfiguration configuration, IBotTelemetryClient telemetryClient, IHttpClientFactory httpClientFactory)
        {
            _httpClientFactory = httpClientFactory;
            _telemetryClient = telemetryClient;

            var httpClient = _httpClientFactory.CreateClient();
            QnAMakerService = new QnAMaker(new QnAMakerEndpoint
            {
                KnowledgeBaseId = configuration["QnAKnowledgebaseId"],
                EndpointKey = configuration["QnAAuthKey"],
                Host = GetHostname(configuration["QnAEndpointHostName"])
            },
            null,
            httpClient,
            _telemetryClient);
        }

        public QnAMaker QnAMakerService { get; private set; }

        private static string GetHostname(string hostname)
        {
            if (!hostname.StartsWith("https://"))
            {
                hostname = string.Concat("https://", hostname);
            }

            if (!hostname.EndsWith("/qnamaker") && !hostname.Contains("/v5.0"))
            {
                hostname = string.Concat(hostname, "/qnamaker");
            }

            return hostname;
        }
    }
}

this 是我遵循的教程。

【问题讨论】:

标签: azure-application-insights qnamaker


【解决方案1】:

此问题的一个可能原因是“应用程序洞察力通常需要 3-5 分钟才能开始出现在门户中。”

如果担心数据丢失,可以使用 Flush() 方法。

如果这不是您的情况,或者您需要更长的时间才能查看数据,我强烈建议您创建支持票证。 https://docs.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-11-17
    • 1970-01-01
    • 2021-11-17
    • 1970-01-01
    • 1970-01-01
    • 2019-04-08
    • 1970-01-01
    相关资源
    最近更新 更多