英文:
Application Insights get raw text
问题
当我在应用程序洞察 (来自门户) 上使用 KQL 运行查询时,我会得到一堆列。是否有任何函数/查询或格式,我可以应用以获取原始文本。我只需要结果中每个项目的原始文本。这样我就可以复制并查询文本。也许我有点守旧,但我不喜欢应用程序洞察的列视图
exceptions
| where timestamp > ago(24h)
| summarize Count=count() by type
| sort by Count desc
| take 5
| join kind=inner (
exceptions
| where timestamp > ago(24h)
) on type
英文:
When I run a query with KQL on Application Insights (from the portal).
Say
exceptions
| where timestamp > ago(24h)
| summarize Count=count() by type
| sort by Count desc
| take 5
| join kind=inner (
exceptions
| where timestamp > ago(24h)
) on type
I get a bunch of columns. Is there any function/query or format that I can apply to get the raw text. I just need the raw text of each item in the result. So I can copy and query the text. Maybe I'm old school but I don't like the Application Insights column view
exceptions
| where timestamp > ago(24h)
| summarize Count=count() by type
| sort by Count desc
| take 5
| join kind=inner (
exceptions
| where timestamp > ago(24h)
) on type
答案1
得分: 1
我同意 @Jason Evans 的看法,如果你正在使用Azure应用洞察,你会得到以下表格格式的日志:
如果你想要单独的列,可以使用以下查询:
exceptions
| where timestamp > ago(30d)
| summarize Count=count() by type
| sort by Count desc
| take 5
| join kind=inner (
exceptions
| where timestamp > ago(30d)
) on type
| project method
在这里,我使用 project
获取所需的列。
Kql
是 Kusto 查询语言,以表格格式获取信息,所以无法获取原始文本。
如果你想要将日志导出到文件中,你可以将日志导出到存储帐户,就像这里所示,然后你将获得一个日志文件。
英文:
I do agree with @Jason Evans, that if you are using Azure Application insights, you will get logs in a table format like below:
If you want individual column you can use below query:
exceptions
| where timestamp > ago(30d)
| summarize Count=count() by type
| sort by Count desc
| take 5
| join kind=inner (
exceptions
| where timestamp > ago(30d)
) on type
| project method
Here I am using project
to get required column.
Kql
is Kusto query language which gets information in table format so raw text is not possible to get.
If you want logs in a file then you can export the logs to storage account like this and then you will get a log file.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论