首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >应用程序洞察与Asp.Net核心配置

应用程序洞察与Asp.Net核心配置
EN

Stack Overflow用户
提问于 2017-06-28 14:38:46
回答 1查看 1K关注 0票数 1

我一直在阅读关于配置ApplicationInsights以减少不必要的通信量和其他事情的重要性。

如何在Asp.Net核心应用程序中做到这一点?似乎不再有applicationinsights.config XML文件了。

我可以在ConnectService.json文件夹中看到一个Application Insights文件,但是里面没有多少?

如何为Asp.Net核心应用程序配置AI?

有人能链接到文档吗?我似乎找不到任何..。

提亚

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-28 20:41:17

所有这些现在都是用代码编写的,并且大部分记录在应用洞察力asp.net核心github wiki上。

例如,请参见https://github.com/Microsoft/ApplicationInsights-aspnetcore/wiki/Dependency-Tracking-and-Performance-Counter-Collection

禁用遥测模块服务 为了禁用服务,需要手动从方法ConfigureServices中的现有服务列表中删除模块。请注意,只有在向服务中添加了应用洞察之后,遥测模块才应该被删除。

代码语言:javascript
代码运行次数:0
运行
复制
 // Removing dependency tracking telemetry module - to disable default dependency tracking 
 var dependencyTrackingService = services.FirstOrDefault<ServiceDescriptor>(t => t.ImplementationType  == typeof(DependencyTrackingTelemetryModule)); 
 if (dependencyTrackingService!= null) 
 { 
     services.Remove(dependencyTrackingService); 
 }

 // Removing performance collector module - to disable default performance counter collection 
 var performanceCounterService = services.FirstOrDefault<ServiceDescriptor>(t => t.ImplementationType> == typeof(PerformanceCollectorModule)); 
 if (performanceCounterService != null) 
 {
     services.Remove(performanceCounterService); 
 }
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44805623

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档