簡體   English   中英

Application Insights 自部署到 Azure Web 應用程序后沒有數據

[英]Application Insights No data since deployed to Azure web app

我正在使用 Azure Application Insights。 經過一些配置步驟和官方文檔之后,我發現我的應用程序洞察力在我的本地構建上運行良好。 Request、Exception、Dependency 和 Custom Event 的數據都出現在 Azure 門戶中。

但是,一旦我將其部署到 Azure Web 應用程序,我就無法在 Azure 門戶中看到任何 Application Insights 數據。

我已經驗證了 Application Insights Dlls 和 Microsoft.Diagnostics.Tracing.EventSource.dll 都根據本文的“自從我將應用程序發布到我的服務器”部分的“無(服務器)數據”部分復制到 azure: https:/ /azure.microsoft.com/en-us/documentation/articles/app-insights-asp-net-troubleshoot-no-data/#q03

其他一些奇怪的事情是,當我遠程調試我的 azure Web 應用程序時,我發現所有 TelemetryClient 都顯示為“未配置”,但是我的 Instrumentation 密鑰在 ApplicationInsights.config 中正確寫入

還有一件事是,當我像這樣更改代碼時:

var client = new TelemetryClient();
client.Context.InstrumentationKey = "The Key";
client.TrackEvent("TestEvent");

自定義事件出現在 Azure 門戶中。 但是請求、異常、依賴項等其他數據不會自動記錄在門戶中。

我的應用程序有什么問題?

在 azure 支持工程師的幫助下,問題已經解決。

原因是在 azure 門戶的 App Setting 中,有一個配置集 "MOBILESERVICESDOTNET_EXTENSION_VERSION" = 1.0.478

刪除此配置后,一切正常。

但我仍然不確定其根本原因。 為什么這個配置會造成這么大的麻煩?

聽起來您正在記錄遙測數據,您可以控制 TelemetryClient - 就像上面的代碼示例一樣。

考慮到這一點,您需要檢查以下幾點:

  • applicationinsights.config 使用您的檢測密鑰進行配置。
  • applicationinsights.config 正在部署到 WebApps
  • 所有必要的遙測模塊都在您的 web.config 中

由於您在本地接收遙測數據,我想說這就像您不部署 applicationinsights.config 文件一樣簡單。

我在 Kudo 中找到了其他故障排除幫助,位於 https://.scm.azurewebsites.net/ApplicationInsights

我最終實際上刪除了所有執行 Application Insights 集成的代碼(包括刪除 ApplicationInsights.config),而是讓應用服務自動處理這些代碼。 由於自定義事件,我可能不是操作的解決方案,對於標准跟蹤來說,它就像一個魅力。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM