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. Note that you get data for all customers across the install base of the app/extension.
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>"
Replace <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>"
Where <instrumentation key>
is replaced by the key denoted in the connection string as InstrumentationKey=<instrumentation key>;<some other parameters>
.
Note
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.
Data in app/extension telemetry
Currently, Business Central offers telemetry on the following operations (the column Extension support shows the types of events that are emitted to app/extension telemetry):
Area | Description | Online | On-premises | Extension support | More information |
---|---|---|---|---|---|
AppSource Submission Validation | Provides information about validation when an extension is submitted to AppSource. | ![]() |
![]() |
See... | |
App key vault secrets | Provides information about the retrieval of secrets from Azure Key Vaults by extensions. | ![]() |
![]() |
![]() |
See... |
Authorization | Provides information about user sign-in attempts. Information includes success or failure indication, reason for failure, user type, and more. | ![]() |
![]() |
See... | |
Azure Function Integration[6] | Provides information about requests to Azure Functions from Business Central | ![]() |
![]() |
See... | |
Client actions[7] | Provides information about usage of client features. | ![]() |
![]() |
See... | |
Cloud migration[8] | Provides information about cloud migration setup, replication runs, and data upgrade | ![]() |
See... | ||
Company lifecycle | Provides information about creating, copying, and deleting of companies. | ![]() |
![]() |
See... | |
Configuration package lifecycle | Provides information about operations done on configuration packages, including exporting, importing, applying, and deleting. | ![]() |
![]() |
See... | |
Database deadlocks[5] | Provides information about database deadlocks that occur. | ![]() |
![]() |
See... | |
Database lock timeouts | Provides information about database locks that have timed out. | ![]() |
![]() |
See... | |
Database wait statistics | Provides information about the wait categories and the wait times a query runs into. | ![]() |
![]() |
See... | |
Provides information about the success or failure of sending emails. | ![]() |
![]() |
See... | ||
Environment lifecycle [5] | Provides information about changes and operations on an environment, like updates, hotfixes, copy, move, delete, configuration changes, and more. | ![]() |
See... | ||
Error message quality[5] | Provides information about error messages that users thought were helpful or unhelpful. | ![]() |
![]() |
See... | |
Error method | Provides information about error dialogs that are shown to the users. | ![]() |
![]() |
See... | |
Extension lifecycle [2] | Provides information about the success or failure of extension-related operations, like publishing, synchronizing, installing, and more. | ![]() |
![]() |
![]() |
See... |
Extension update | Provides information about errors that occur and upgrade tags used when upgrading an extension. | ![]() |
![]() |
![]() |
See... |
Feature Management[7] | Provides information about the state changes done on the Feature Management page. | ![]() |
![]() |
See... | |
Feature telemetry | Provides information about the usage and errors of features. | ![]() |
![]() |
See... | |
Field monitoring trace | Provides information about the usage of the field monitoring feature. | ![]() |
![]() |
See... | |
Job queue | Provides information about creating and running job queue entries. | ![]() |
![]() |
See... | |
Long running AL method trace[3] | Provides information about long running AL methods. | ![]() |
![]() |
![]() |
See... |
Long running operation (SQL query) | Provides information about SQL queries that take longer than expected to execute. | ![]() |
![]() |
![]() |
See... |
Onboarding[7] | Provides information about the onboarding of users. | ![]() |
![]() |
See... | |
Page views | Provides information about the pages that users open in the modern client. | ![]() |
![]() |
![]() |
See... |
Performance Toolkit (BCPT) | Provides information about test results from running the Business Central Performance Toolkit (BCPT). | ![]() |
![]() |
See... | |
Permissions | Provides information about adding, removing, and assigning permission sets. | ![]() |
See... | ||
Permissions dependency cycle[5] | Provides information about dependency cycles in permissions. | ![]() |
![]() |
See... | |
Permission error[5] | Provides information about errors related to permissions that users get. | ![]() |
![]() |
See... | |
Profile configuration lifecycle[6] | Provides information about design operations done on profiles from the client. | ![]() |
![]() |
See... | |
Report generation | Provides information about the execution of reports. | ![]() |
![]() |
![]() |
See... |
Retention policy trace[3] | Provides information about the usage of the retention policy feature. | ![]() |
![]() |
See... | |
Stopped sessions[5] | Provides information about background sessions that were forcibly stopped from the admin center or by calling the StopSession method from AL. | ![]() |
![]() |
See... | |
Table index trace[3] | Provides information about the addition or removal of a table index. | ![]() |
![]() |
![]() |
See... |
Task scheduler lifecycle | Provides information the execution of scheduled tasks. | ![]() |
![]() |
See... | |
User checklists[5] | Provides information about when the status of a user checklist changes | ![]() |
![]() |
See... | |
Verbose logging enabled/disabled[5] | Provides information about when additional logging is enabled and disabled from the client. | ![]() |
![]() |
See... | |
Web service access key authentication | Provides information about the authentication of web server access keys on web service requests. | ![]() |
![]() |
See... | |
Web service publish failures[8] | Provides information about the web services publish failures. | ![]() |
![]() |
![]() |
See... |
Web service requests (incoming) | Provides information about the execution time of incoming web service requests. | ![]() |
![]() |
![]() |
See... |
Web service requests (outgoing ) | Provides information about the execution time of outgoing web service requests. | ![]() |
![]() |
![]() |
See... |
1This signal is only emitted to the Application Insights resource that's specified in the extension.
2Introduced in Business Central 2020 release wave 1, version 16.3. For extension telemetry, this signal was introduced in 2020 release wave 2, version 17.1.
3Introduced in Business Central 2020 release wave 1, version 17.1. For extension telemetry, this signal was introduced in 2021 release wave 1, version 18.1.
4Introduced in Business Central 2021 release wave 1, version 18.
5Introduced in Business Central 2022 release wave 1, version 20.
6Introduced in Business Central 2022 release wave 2, version 21.
7Introduced in Business Central 2023 release wave 1, version 22.
8Introduced in Business Central 2023 release wave 1, version 22.1.
See Also
Get Started with AL
Publishing and Installing Extensions
JSON Files
Viewing telemetry data in Application Insights
LogMessage Method
Feedback
Submit and view feedback for