azure - 如何扩展 Azure App Insight 日志查询中列名称中包含空格和括号的列?

标签 azure azure-application-insights

我正在尝试编写一个查询来从 Azure Application Insight 中获取一些数据,我想要做的是该日志中有一个字段,我想将其扩展为单独的列,但在尝试时使用导出的列运行查询会出现语法错误。

Column Name: Request Duration (milliseconds)

查询:

customEvents
| extend Request_Duration_(milliseconds)_ = tostring(parse_json(tostring(customDimensions.Properties)).["Request Duration (milliseconds)"])

最佳答案

您的查询存在一些错误,请尝试以下代码:

customEvents 
| where name == "e2" 
| extend Request_Duration_milliseconds = parse_json(tostring(customDimensions.Properties)).["Request Duration (milliseconds)"]
| project customDimensions, Request_Duration_milliseconds

测试结果:

enter image description here

关于azure - 如何扩展 Azure App Insight 日志查询中列名称中包含空格和括号的列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61751193/

相关文章:

json - 如何在Azure Pipeline中将JSON文件设置为变量并在后续任务中使用它?

Azure多个网站只有一个角色,但有些网站在我发布时不会重建

python - 在 Azure Functions 中运行 Python + OpenCV + dlib

azure - 在 Azure 云服务中将 Web 套接字服务器实现为 Web 角色

c# - Windows 应用商店应用程序崩溃未登录到 Application Insights azure 门户

c# - Azure TableEntity EntityResolver 用于调用和重用基本解析功能

c# - 在 Application Insights 中查看请求的响应正文

azure - 如何监控 Azure VM 上的 Windows 服务?

azure - Azure Monitor 'Response time' 和 AppInsights 'Duration' 之间有什么区别?

asp.net - Application Insights 的应用程序 map 不显示依赖项调用