简体   繁体   English

Azure 应用程序洞察 | 昆仑 | 获取异常详情

[英]Azure Application Insights | KQL | Get exception details

We are using Azure application Insights for error logging.我们使用 Azure 应用程序洞察来记录错误。 I am new to KQL and trying to fetch custom properties from inbuilt "customDimensions" column in the following format,我是 KQL 的新手,并尝试从以下格式的内置“customDimensions”列中获取自定义属性,

Data in "customDimensions" column “customDimensions”列中的数据

{
  "File Name":"Sample File 1",
  "Correlation ID":"e33a8d45-0566-4bf2-94f8-54a6fec29bff",
  "Error List":"[
      {
        "Function Name":"Sample Function 1",
        "Code":"#231256#"
      },
      {
        "Function Name":"Sample-Function-2",
        "Code":"#231258#"
      },
   ]"
}

Expected Output预期产出

File Name文件名 Correlation ID相关 ID Function Name函数名称 Code代码
Sample File 1样本文件 1 e33a8d45-0566-4bf2-94f8-54a6fec29bff e33a8d45-0566-4bf2-94f8-54a6fec29bff Sample Function 1示例功能 1 #231256# #231256#
Sample File 1样本文件 1 e33a8d45-0566-4bf2-94f8-54a6fec29bff e33a8d45-0566-4bf2-94f8-54a6fec29bff Sample-Function-2样本函数 2 #231258# #231258#

How can I achieve the above output using KQL?如何使用 KQL 实现上述输出?

Thank You.谢谢你。

Update: Adding a sample datatable更新:添加示例数据表

datatable(ErrorDetails:dynamic)
[
    dynamic({
        "File Name":"Sample File 1",
        "Correlation ID":"e33a8d45-0566-4bf2-94f8-54a6fec29bff",
        "Error List": [{
                "Function Name":"Sample Function 1",
                "Code":"#231256#"
            },
            {
                "Function Name":"Sample-Function-2",
                "Code":"#231258#"
            }
        ]
    })
]

mv-expand operator mv-expand运算符

datatable(ErrorDetails:dynamic)
[
    dynamic({
        "File Name":"Sample File 1",
        "Correlation ID":"e33a8d45-0566-4bf2-94f8-54a6fec29bff",
        "Error List": [{
                "Function Name":"Sample Function 1",
                "Code":"#231256#"
            },
            {
                "Function Name":"Sample-Function-2",
                "Code":"#231258#"
            }
        ]
    })
]
| mv-expand EL = ErrorDetails.["Error List"]
| project ["File Name"] = ErrorDetails["File Name"], ["Correlation ID"] = ErrorDetails["Correlation ID"], ["Function Name"] = EL["Function Name"], ["Code"] = EL["Code"]
File Name文件名 Correlation ID相关 ID Function Name函数名称 Code代码
Sample File 1样本文件 1 e33a8d45-0566-4bf2-94f8-54a6fec29bff e33a8d45-0566-4bf2-94f8-54a6fec29bff Sample Function 1示例功能 1 #231256# #231256#
Sample File 1样本文件 1 e33a8d45-0566-4bf2-94f8-54a6fec29bff e33a8d45-0566-4bf2-94f8-54a6fec29bff Sample-Function-2样本函数 2 #231258# #231258#

Fiddle 小提琴

How can I achieve the above output using KQL?如何使用 KQL 实现上述输出?

  • Beow is the sample command which can be used to get the correlation id and function names in column. Beow 是示例命令,可用于获取列中的相关 ID函数名称
customEvents
 | extend Org = tostring(customDimensions.correlationID)
  • Refer this document which has related discussion.请参阅有相关讨论的此文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Application Insights Webhook JSON中获取异常详细信息 - Get Exception Details in Application Insights webhook JSON Azure 应用程序洞察 | 昆仑 | 包含对象数组的 customDimensions 列 - Azure Application Insights | KQL | customDimensions column containing array of objects 如何在 Azure App Insights (KQL) 中获取所有列 + 自定义列 - How to get all colums + custom ones in Azure App Insights (KQL) 无法在 Azure Application Insights 上找到异常 - unable to find exception on Azure Application Insights Azure应用程序见解-为异常创建深层链接? - Azure Application Insights - create deep link for an exception? Python 记录器异常在 Azure Application Insights (Azure Function) 中记录为跟踪 - Python Logger exception is logged as trace in Azure Application Insights (Azure Function) 如何在 Application Insights 中获取每个 function 应用程序的详细信息 - How to get details of per function app in Application Insights Azure Application Insights中的会话 - Sessions in Azure Application Insights Azure 应用程序洞察 - Azure Application Insights 跟踪表中的 iKey 是什么 - KQL [ Kusto 查询语言] - Application Insights - 也查询以下 KQL 查询的优化 - What is iKey in traces table - KQL [ Kusto Query Language] - Application Insights - Also query Optimization of following KQL query
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM