0

I'm hosting Wordpress on Web App for Linux. I would like to run Application Insights for various metrics. The problem is that Application Insights is not available for Web App for Linux when creating Web App in Azure Portal. See screenshots below:

enter image description here

enter image description here

This however is not consistent with Wordpress on Linux marketplace offering which does include Application Insights provisioning.

enter image description here

I read related posts, like this one Application Insights not work in Web App for Azure Containers, however I did not find a solution.

Thank you

Alex S
  • 1,171
  • 1
  • 9
  • 25

1 Answers1

2

In this case when you are using a Linux application, you need to create and configure the application information manually.

First, create a new application insights:

enter image description here

Then just configure the keys in the application settings of your app service:

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
  }

and ready! Your application will start collecting telemetry.

A tip: Use Serilog if you are programming in .Net

Henrique Mauri
  • 718
  • 6
  • 20