[英]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![]() |
Function Name![]() |
Code![]() |
---|---|---|---|
Sample File 1![]() |
e33a8d45-0566-4bf2-94f8-54a6fec29bff ![]() |
Sample Function 1![]() |
#231256# ![]() |
Sample File 1![]() |
e33a8d45-0566-4bf2-94f8-54a6fec29bff ![]() |
Sample-Function-2![]() |
#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![]() |
Function Name![]() |
Code![]() |
---|---|---|---|
Sample File 1![]() |
e33a8d45-0566-4bf2-94f8-54a6fec29bff ![]() |
Sample Function 1![]() |
#231256# ![]() |
Sample File 1![]() |
e33a8d45-0566-4bf2-94f8-54a6fec29bff ![]() |
Sample-Function-2![]() |
#231258# ![]() |
How can I achieve the above output using KQL?
如何使用 KQL 实现上述输出?
customEvents
| extend Org = tostring(customDimensions.correlationID)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.