Ash*_*ous 5 azure azure-web-sites azure-application-insights
My application writes a lot of logs ib Dependencies which caused it to be super expensive (even more expensive than my server farms + database) and we have not used it for anything for months. How can I disable the dependencies but keep the rest (requests ,exceptions, custom events, etc.)?
In the documentation, adding application insights is not seperated from adding dipendencies. https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-dependencies
At the same time,
in application insights resource >Usage and estimated costs
The only options avalable are
-Data Sampling
But The custom events (and requests) have a great value for the business and I don't want them not to be logged because of a cap, or being sampled.

如果不需要,只需从 ApplicationInsights.config 文件中删除DependencyTrackingTelemetryModule即可。
寻找这个条目:
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector">
.....
</Add>
Run Code Online (Sandbox Code Playgroud)
并将其删除或注释掉:
<!--<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector">
.....
</Add>-->
Run Code Online (Sandbox Code Playgroud)
另一种方法是仅将依赖项的采样设置为 100%。有关详细信息,请参阅文档。但我认为最好不要加载或运行不需要的东西。
| 归档时间: |
|
| 查看次数: |
396 次 |
| 最近记录: |