Sending App/Extension Telemetry to Azure Application Insights
APPLIES TO: Business Central 2020 release wave 2 and later
This article describes how to set up an extension to send telemetry data to Azure Application Insights for monitoring and analyzing. Business Central emits telemetry data for several operations that occur when extension code is run. For an overview about the telemetry with Azure Application Insights, see Monitoring and Analyzing Telemetry.
This feature targets publishers of per-tenant or appsource extensions to give them insight into issues in their extensions before partners and customers report them.
Get an Application Insights resource in Azure
The first thing to do is to create an Application Insights resource in Azure if you don't have one. For more information, see Create an Application Insights resource.
The Azure Application Insights resource is assigned a connection string, which you can see on the Overview page for the resource in Azure. Copy this connection string because you'll need it to enable telemetry in the app/extension.
Add the Application Insights information to the app/extension
The next step is to add the
"applicationInsightsConnectionString" setting the extension's app.json as shown:
"applicationInsightsConnectionString": "<connection string>"
<connection string> with the string that you copied in the Azure Application Insights overview. For more information about the format of the Azure Application Insights connection string, see Connection Strings.
When done, build the extension package, then publish and install it as usual. When the extension is run from Business Central, Azure Application Insights gathers the telemetry data for viewing and analyzing.
Prior to runtime version 7.2
Up until runtime version 7.2 you cannot use the
"applicationInsightsConnectionString" setting. Instead you have to use the
"applicationInsightsKey" setting which is added using only the instrumentation key from the Azure Application Insights connection string as shown:
"applicationInsightsKey": "<instrumentation key>"
<instrumentation key> is replaced by the key denoted in the connection string as
InstrumentationKey=<instrumentation key>;<some other parameters>.
Transition to using connection strings for data ingestion in Azure Application Insights by 31 March 2025. On 31 March 2025, technical support for instrumentation key–based global ingestion in the Azure Application Insights feature of Azure Monitor will end. After that date, your Azure Application Insights resources will continue to receive data, but Microsoft no longer provide updates or customer support for instrumentation key–based global ingestion.
Submit and view feedback for