[英]Application Insights for China region
我正在使用 Application Insights,在我的地區(歐洲)我添加它是這樣的:
services.AddApplicationInsightsTelemetry(instrumentationKey);
現在我需要在中國地區使用 Application Insights。 根據dock docs.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 本身是否足以連接和與中國地區合作。
UPD
推薦的方法是使用 ConnectionString 而不是覆蓋這些端點。 ConnectionString 是專門為簡化非公共雲配置而創建的。
引用的文章是在 ConnectionString 之前創建的。 感謝您提出,我們會在文章中明確說明推薦的方式是使用 ConnectionString。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.