gee*_*hic 10 azure azure-application-insights
我们使用应用程序洞察来收集服务遥测数据,我们的服务是在 Service Fabric 集群上运行的 ASP NET Core。我们从我们的一项服务中观察到大量丢失的日志,并怀疑这是由于自适应采样造成的。
我有一些关于自适应采样的问题,以便更好地进行故障排除 -
任何帮助表示赞赏!
您可以通过运行以下查询在 Application Insights 实例的日志窗格中查看它:
union requests,dependencies,pageViews,browserTimings,exceptions,traces
| where timestamp > ago(1d)
| summarize RetainedPercentage = 100/avg(itemCount) by bin(timestamp, 1h), itemType
Run Code Online (Sandbox Code Playgroud)
每当您看到RetainedPercentage少于 100 时,您就丢失了日志数据。更多信息请参见此处。
一种检查方法是打开日志体验并检查“itemCount”属性。如果没有采样(未配置或自适应采样未超过阈值),则所有值应为 1。
考虑其价值的一种方法是,这个特定事件(itemCount = X)是从 X 个事件中随机挑选的。itemCount 值越大 => 数据采样越多。
您可以使用此查询:
union requests, dependencies, traces, exceptions
| where timestamp > ago(24h)
| project itemCount
| summarize count() by itemCount
| order by itemCount
Run Code Online (Sandbox Code Playgroud)
这是一个采样率很高的应用程序的示例:
| 归档时间: |
|
| 查看次数: |
3311 次 |
| 最近记录: |