azure - 通过 KQL 在共享仪表板中使用过滤

标签 azure azure-application-insights azure-data-explorer kql

我正在尝试使用记录到应用程序洞察的遥测数据通过共享仪表板添加一些功能,

当我为 FileNameName 的 customDimensions 应用过滤器并应用 take 25 时,此查询为我提供了在条形图中呈现的所需结果> 它渲染得很好,并向我展示了特定持久 azure 函数的 25 个最慢的调用,其中操作 id 作为 y 轴,计算的持续时间(毫秒)在 x 轴上

Example Example 2

customEvents
| extend FileName = tostring(customDimensions["FileName"])
| extend Name = tostring(customDimensions["Name"])
| extend OperationId = operation_Id
| summarize Duration=datetime_diff('millisecond', max(timestamp), min(timestamp)) by OperationId, Name, FileName
| order by Duration desc
| render barchart with (xtitle="Operation Id", ytitle="Duration (ms)", legend=hidden)

当我尝试将相同的查询(不带Where 子句)添加到共享仪表板时,我会应用相同的 FileName、Name 过滤器,然后看到不同的结果。

  1. 我无法申请 take 25,因为这限制了我可以在 30 天内选择的 FileName
  2. 当我选择 FileNameName 时,我可以看到图表发生变化,但当我选择 OperationId 时,列表总数保持不变并且不会根据之前的输入进行过滤

Shared Dashboard Shared Dashboard Query

如何复制与我使用提供的 FileNameName 查询时显示的第一张图片中相同的结果,并仅获取一个子集(前 25 个) - 而仍然能够在共享仪表板中应用过滤器吗?

我尝试过使用工作簿,但不幸的是,从 appinsights 日志查询编译的这些查询看起来不同,并且您无法隐藏图例等内容,因此这是不可取的

最佳答案

How can I replicate the same results as in the first image shown where I am querying with provided FileName and Name and take only a subset (first 25) - while still being able to apply filters in a Shared Dashboard?

  1. I am not able to apply take 25 as that limits the FileName available for me to choose from over a 30-day period

我注意到,在您的查询中,您在使用扩展时收集了所有信息。

使用与您使用过的相同的查询 enter image description here

过滤总体结果的 25 个值 enter image description here

共享仪表板中的结果 enter image description here

  1. As I select FileName and Name I can see the graph changes but when I go to select a OperationId the list total remains the same and does not filter based on the previous inputs

您可以使用 ${Filter_Name } 在查询中动态使用过滤器值。

例如:

Event | where ${Computers} | summarize count() by EventLevelName

关于azure - 通过 KQL 在共享仪表板中使用过滤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74525718/

相关文章:

sql - 主设备和事件辅助设备之间的通信是否安全以及其工作原理

c# - Azure 存储事件触发器 - 捕获正在删除的 blob

php - Symfony2 和 Azure 网站的性能问题

c# - 列出 Azure 存储帐户 .NET core 中的所有现有表

azure-data-explorer - 库斯托 |用 where 子句总结 count() 多列

Azure:应用程序洞察。是否需要 ai.x.xx.x-buildxxxxx.js 文件?

Azure Application Insights - 禁用记录页面 View

azure-application-insights - 应用洞察中的 "Dependency (AJAX)"

Azure kusto集群表通过数据列实现行级安全性,基于哪些数据列可以跨多个表进行过滤?

azure - 使用 Kusto 查询语言的具有单个数字的图表