0

根据文档Profile live Azure Cloud Services with Application Insights。必须在 WadCfg 中提供应用程序洞察密钥。

<WadCfg>
  <DiagnosticMonitorConfiguration>...</DiagnosticMonitorConfiguration>
  <SinksConfig>
    <Sink name="MyApplicationInsightsProfiler">
      <!-- Replace with your own Application Insights instrumentation key. -->
      <ApplicationInsightsProfiler>00000000-0000-0000-0000-000000000000</ApplicationInsightsProfiler>
    </Sink>
  </SinksConfig>
</WadCfg>

但是,在每个环境使用 ServiceConfiguration.*.cscfg 文件时,应用程序洞察力密钥存储在 cscfg 文件中,但<ApplicationInsightsProfile>似乎不支持该位置。

如何将应用程序洞察密钥链接到 WadCfg 文件中的分析器接收器。或者是否有其他方法可以为每个环境配置 Application Insights Profiler?

4

1 回答 1

0

最终在构建管道中创建了一个 wadcfg 转换,因为似乎没有任何内置机制来处理这个问题。

于 2021-05-18T13:29:49.580 回答