Monitoring and Analyzing Telemetry
APPLIES TO: Business Central 2019 release wave 2 and later
Business Central emits telemetry data for various activities and operations on environments and apps/extensions. Monitoring telemetry gives you a look at the activities and general health of your environments/apps, so you can diagnose problems and analyze operations that affect performance. Azure Application Insights is a service hosted within Azure that gathers telemetry data for analysis and presentation. Whether running Business Central online or on-premises, you can set your tenants up to send telemetry to Azure Application Insights.
Environment-level and app/extension-level telemetry
Telemetry can be enabled on two different levels:
Telemetry can be enabled for a Business Central online environment or on-premises Business Central Server instance. When enabled on the environment, telemetry is emitted to a single Azure Application Insights resource for gathering data on operations that happen on the environment.
With the Business Central 2020 release wave 2 and later, telemetry can also be enabled on a per-extension basis. Enabling telemetry is done by setting an Azure Application Insights connection string in the app's manifest (app.json file). At runtime, certain events related to the app/extension are emitted to the Azure Application Insights resource. This feature targets publishers of per-tenant extensions or Appsource apps to give them insight into issues in their app/extension before partners and customers report them.
Currently, Business Central offers telemetry on the following operations:
|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||Provides information about requests to Azure Functions from Business Central||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||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 ||Provides information about changes and operations on an environment, like updates, hotfixes, copy, move, delete, configuration changes,and more.||See...|
|Error message quality||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 ||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 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||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...|
|Page views||Provides information about the pages that users open in the modern client.||||||See...|
|Permissions||Provides information about adding, removing, and assigning permission sets.||See...|
|Permission error||Provides information about errors related to permissions that users get.||See...|
|Profile configuration lifecycle||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||Provides information about the usage of the retention policy feature.||See...|
|Incoming web service requests||Provides information about the execution time of incoming web service requests.||See...|
|Outgoing web service requests||Provides information about the execution time of outgoing web service requests.||See...|
|Stopped sessions||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||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||Provides information about when the status of a user checklist changes||See...|
|Verbose logging enabled/disabled||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...|
To send telemetry data to Azure Application Insights, you must have an Application Insights resource in Azure. Once you have the Azure Application Insights resource, you can start to configure your environments and apps/extensions to send telemetry data to it. Learn more at Enable Sending Telemetry to Application Insights.
For apps/extensions, see Sending Extension Telemetry to Azure Application Insights.
Control telemetry cost
Azure Application Insights is billed based on the volume of telemetry data that is sent (data ingestion) and how long time you want data to be available (data retention).
Check the Azure Application Insights documentation for up-to-date information on pricing at https://azure.microsoft.com/pricing/details/monitor/.
For more information, go to Control Telemetry Cost.
Viewing telemetry data
Telemetry from Business Central is stored in Azure Application Insights Logs in the traces and pageViews tables. You can view collected data by writing log queries using Kusto query language (KQL). Learn more at Logs in Azure Monitor and Overview of log queries in Azure Monitor.
For more information, go to Analyze Telemetry with KQL.
Setting up alerts on telemetry
If something happens in your environment or app that you need to act on, you can set up a system that sends you an alert. Azure Application Insights makes it easy to define such alerts.
You can use the following tools to define and set up alerts on telemetry events:
- Azure Application Insights Alerts
- Azure Logic Apps
- Power Automate
All three approaches need a Kusto (KQL) query to define the alerting condition.
For more information, go to Alert on Telemetry.
Telemetry sample code
To make it easier to get started using Azure Application Insights with Business Central, samples of KQL code are available in the Business Central BCTech repository on GitHub.
Business Central telemetry FAQ
The Business Central BCTech repository on GitHub has an extensive FAQ on Business Central telemetry in Azure Application Insights.
Telemetry Event IDs
Enable Sending Telemetry to Application Insights
Working with Administration Tools
Business Central Administration Center
Managing Tenant Notifications
Introduction to Automation APIs
Submit and view feedback for