gpt4 book ai didi

azure - 关闭应用程序见解采样

转载 作者:行者123 更新时间:2023-12-02 06:31:25 28 4
gpt4 key购买 nike

我正在使用 Web 应用程序和 Visual Studio 2015 的应用程序见解的最新版本,我正在尝试关闭应用程序见解的采样,但它仍然处于打开状态我删除了以下内容:

<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
<IncludedTypes>Event</IncludedTypes>
</Add>

我添加了以下内容

   <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
<ExcludedTypes>Event;PageView;Request</ExcludedTypes>
</Add>

我什至尝试删除ExcludedTypes的所有部分,并且我也尝试了以下操作

   <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<ExcludedTypes>Event;PageView;Request</ExcludedTypes>
</Add>

但是以上所有方法都不起作用,我不断收到以下内容

enter image description here

最佳答案

正如 ZakiMa 所说,您可以尝试删除或注释掉 AdaptiveSamplingTelemetryProcessor 节点。请引用这个article .

Disable adaptive sampling: In ApplicationInsights.config, remove or comment out the AdaptiveSamplingTelemetryProcessor node.

<TelemetryProcessors>

<!-- Disabled adaptive sampling:
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
</Add>
-->

如果您的项目是.Net Core项目,您可以通过代码禁用自适应采样。请引用这个article .

 public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
var tc = TelemetryConfiguration.Active;
var channel = tc.TelemetryChannel;

var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions();
aiOptions.EnableAdaptiveSampling = false;
aiOptions.InstrumentationKey = "myikey";

services.AddApplicationInsightsTelemetry(aiOptions);
}

关于azure - 关闭应用程序见解采样,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49364060/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com