【问题标题】:Custom Initialize AppInsights through asp.net code通过 asp.net 代码自定义初始化 AppInsights
【发布时间】:2017-12-06 00:09:43
【问题描述】:

我正在尝试根据从 DB 返回的标志以程序方式打开/关闭我的 asp.net 代码中的 appinsights。当我研究时,我在 app_start 中找到了以下设置。但不确定是否可以在代码的任何地方动态实现相同的目标

Disable application insights in debug

请告诉我你的建议。

谢谢!

【问题讨论】:

    标签: asp.net-mvc azure azure-application-insights


    【解决方案1】:

    是的,这是可能的。很多人做的类似不一定是“禁用”人工智能,而是根据环境(dev/test/staging/prod/etc)将遥测发送到不同的资源

    https://blogs.msdn.microsoft.com/devops/2015/01/07/application-insights-support-for-multiple-environments-stamps-and-app-versions/

    您可以按照链接的方式禁用遥测,或者您可以将遥测发送到不同的资源(或根本不发送资源)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-14
      • 2011-08-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多