gpt4 book ai didi

c# - 中国地区应用洞察

转载 作者:行者123 更新时间:2023-12-03 05:19:35 27 4
gpt4 key购买 nike

我正在使用 Application Insights,在我所在的地区(欧洲),我按如下方式添加它:

services.AddApplicationInsightsTelemetry(instrumentationKey);

现在我需要在中国地区使用 Application Insights。据码头learn.microsoft.com我更新了端点,但它从未开始为我工作。我还是没找到原因。

services.ConfigureTelemetryModule<QuickPulseTelemetryModule>((module, o) => module.QuickPulseServiceEndpoint="https://quickpulse.applicationinsights.azure.cn/QuickPulseService.svc");
services.AddSingleton(new ApplicationInsightsApplicationIdProvider() { ProfileQueryEndpoint = "https://dc.applicationinsights.azure.cn/api/profiles/{0}/appId" });
services.AddSingleton<ITelemetryChannel>(new ServerTelemetryChannel() { EndpointAddress = "https://dc.applicationinsights.azure.cn/v2/track" });
services.AddApplicationInsightsTelemetry("china instrumentation key");

然后我尝试使用 ConnectionString 进行连接,而不修改端点,并且它有效,但是我找不到有关使用 ConnectionString 连接到中国区域的任何信息。我担心通过这样的连接,某些遥测或其他功能可能无法工作,但我不知道如何检查它。

所以对我来说,关键问题可能是 ConnectionString 本身是否足以连接和与中国地区合作。

更新

Warning

Endpoint modification is not recommended. Transition to connection strings to simplify configuration and eliminate the need for endpoint modification.

(Source)

最佳答案

推荐的方法是使用 ConnectionString 而不是覆盖这些端点。 ConnectionString 是专门为了简化非公共(public)云配置而创建的。

引用的文章是在 ConnectionString 之前创建的。感谢您提出来,我们会在文章中明确说明,推荐的方式是使用 ConnectionString。

关于c# - 中国地区应用洞察,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73373050/

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