【问题标题】:Azure application insights: EventCounterCollectionModule enable/disable on demandAzure 应用程序洞察:EventCounterCollectionModule 按需启用/禁用
【发布时间】:2021-11-22 22:02:25
【问题描述】:

在生产 asp net core webapp 上,我们想使用 EventCounterCollectionModule 收集 System.Runtime 计数器(cpu-usage、gen-0-size、gen-1-size 等)并将其推送到 Azure 应用程序洞察。

我们希望以编程方式启用和禁用此模块 (EventCounterCollectionModule)。就文档(https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core)而言,这只能在 IServiceCollection 服务注册期间的 StartUp 类的 ConfigureServices 方法期间完成。因此,这需要重新部署以启用和禁用日志。

除了startup.cs ConfigureServices方法之外,有没有办法在代码中启用或禁用模块(例如:控制器)。

【问题讨论】:

标签: c# azure asp.net-core .net-core azure-application-insights


【解决方案1】:

ApplicationInsights 目前不具备“即时”更改配置的功能。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-03-13
    • 1970-01-01
    • 2022-01-06
    • 1970-01-01
    • 2023-04-08
    • 2015-11-10
    • 2021-04-02
    相关资源
    最近更新 更多