gpt4 book ai didi

azure - Application Insights - 如何排除 localhost

转载 作者:行者123 更新时间:2023-12-02 06:09:49 27 4
gpt4 key购买 nike

我已通过标准方式将应用程序见解添加到我的应用程序中,它运行良好,我从本地网站和工作项目收集遥测数据,并在 Azure 上发布。但是有很多数据是从localhost发送的,怎么能说不从localhost发送任何数据呢?谢谢

最佳答案

正如 Brendan 所说,您可以在本地主机上的 ApplicationInsights.config 中删除 InstrumentationKey 并仅在代码中将其设置为发布版本:TelemetryConfiguration.Active.InsrumentationKey = "MyKey" .

此外,您可以通过将以下代码设置为 article禁用遥测说。

TelemetryConfiguration.Active.DisableTelemetry = true;

有关如何在 Application Insights 上忽略 localhost 的更多详细信息,您可以引用此 case .

关于azure - Application Insights - 如何排除 localhost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49311265/

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