适用于Linux的Web App的应用程序见解

时间:2020-05-11 14:51:46

标签: wordpress azure azure-application-insights azure-app-service-plans

我在Linux的Web App上托管Wordpress。我想针对各种指标运行Application Insights。问题是,在Azure门户中创建Web App时,Application Insights不适用于Linux Web App。查看以下屏幕截图:

enter image description here

enter image description here

但这与Linux市场上的Wordpress产品(包括Application Insights置备)不一致。

enter image description here

我阅读了相关的帖子,例如Application Insights not work in Web App for Azure Containers,但是我没有找到解决方法。

谢谢

1 个答案:

答案 0 :(得分:1)

在这种情况下,当您使用Linux应用程序时,需要手动创建和配置应用程序信息。

首先,创建一个新的应用程序见解:

enter image description here

然后只需在应用程序服务的应用程序设置中配置密钥:

enter image description here

  {
    "name": "APPINSIGHTS_INSTRUMENTATIONKEY",
    "value": "XXXXXXXX-XXXXXX-XXXX-XXXX-XXXXXXX",
    "slotSetting": true
  },
  {
    "name": "APPINSIGHTS_PROFILERFEATURE_VERSION",
    "value": "1.0.0",
    "slotSetting": true
  },
  {
    "name": "APPINSIGHTS_SNAPSHOTFEATURE_VERSION",
    "value": "1.0.0",
    "slotSetting": true
  },
  {
    "name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
    "value": "InstrumentationKey=XXXXXXXX-XXXXXX-XXXX-XXXX-XXXXXXX",
    "slotSetting": false
  },
  {
    "name": "ApplicationInsightsAgent_EXTENSION_VERSION",
    "value": "~2",
    "slotSetting": true
  },
  {
    "name": "XDT_MicrosoftApplicationInsights_BaseExtensions",
    "value": "~1",
    "slotSetting": true
  }

准备好了!您的应用程序将开始收集遥测。

提示:如果使用.Net编程,请使用 Serilog