Édition

Partage via


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 in Business Central can be enabled on two different levels:

  • Environment-level telemetry
  • App/extension-level telemetry (for each app/extension installed)

Shows how Environment-level telemetry and App/extension-level telemetry works in Business Central AL

When telemetry is enabled on the environment level, telemetry is emitted to an 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 Microsoft AppSource apps. It gives extension publishers insight into usage of their apps/extensions and also allows them to find errors and performance issues before partners and customers report them.

Both online environments and on-premises instances can emit telemetry to Azure Application Insights.

Tip

As an AL developer, you can craft custom telemetry messages directly from AL using the Feature Telemetry codeunit in the System Application or by using the LogMessage Method.

Available telemetry

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. check mark for feature. check mark for feature See...
App key vault secrets Provides information about the retrieval of secrets from Azure Key Vaults by extensions. check mark for feature.[1] check mark for feature[1] check mark for feature See...
Authorization Provides information about user sign-in attempts. Information includes success or failure indication, reason for failure, user type, and more. check mark for feature. check mark for feature. See...
Azure Function Integration[6] Provides information about requests to Azure Functions from Business Central check mark for feature. check mark for feature See...
Changelog configuration changes[9] Provides information about changes to the configuration of the change log. check mark for feature. check mark for feature See...
Client actions[7] Provides information about usage of client features. check mark for feature. check mark for feature See...
Cloud migration[8] Provides information about cloud migration setup, replication runs, and data upgrade check mark for feature. See...
Company lifecycle Provides information about creating, copying, and deleting of companies. check mark for feature. check mark for feature See...
Configuration package lifecycle Provides information about operations done on configuration packages, including exporting, importing, applying, and deleting. check mark for feature. check mark for feature See...
Database deadlocks[5] Provides information about database deadlocks that occur. check mark for feature. check mark for feature See...
Database lock timeouts Provides information about database locks that have timed out. check mark for feature. check mark for feature See...
Database wait statistics Provides information about the wait categories and the wait times a query runs into. check mark for feature. check mark for feature See...
Email Provides information about the success or failure of sending emails. check mark for feature. check mark for feature See...
Environment lifecycle [5] Provides information about changes and operations on an environment, like updates, hotfixes, copy, move, delete, configuration changes, and more. check mark for feature. See...
Environment validation [7] Provides information about proactive validattions on extensions in the environment against the next release. check mark for feature. See...
Error message quality[5] Provides information about error messages that users thought were helpful or unhelpful. check mark for feature. check mark for feature See...
Error method Provides information about error dialogs that are shown to the users. check mark for feature. check mark for feature check mark for feature. See...
Extension lifecycle [2] Provides information about the success or failure of extension-related operations, like publishing, synchronizing, installing, and more. check mark for feature. check mark for feature check mark for feature See...
Extension update Provides information about errors that occur and upgrade tags used when upgrading an extension. check mark for feature. check mark for feature check mark for feature See...
Extension Upload Validation[9] Provides information about validations when a user/administrator uploads a per-tenant extension to an environment from the Extension Management page. check mark for feature. See...
Feature Management[7] Provides information about the state changes done on the Feature Management page. check mark for feature. check mark for feature See...
Feature telemetry Provides information about the usage and errors of features. check mark for feature. check mark for feature See...
Field monitoring trace Provides information about the usage of the field monitoring feature. check mark for feature. check mark for feature See...
Job queue Provides information about creating and running job queue entries. check mark for feature. check mark for feature See...
Long running AL method trace[3] Provides information about long running AL methods. check mark for feature. check mark for feature check mark for feature See...
Long running operation (SQL query) Provides information about SQL queries that take longer than expected to execute. check mark for feature. check mark for feature check mark for feature See...
Onboarding[7] Provides information about the onboarding of users. check mark for feature. check mark for feature See...
Page views Provides information about the pages that users open in the modern client. check mark for feature. check mark for feature.[6] check mark for feature[4] See...
Performance Toolkit (BCPT) Provides information about test results from running the Business Central Performance Toolkit (BCPT). check mark for feature. check mark for feature. See...
Permissions Provides information about adding, removing, and assigning permission sets. check mark for feature. See...
Permissions dependency cycle[5] Provides information about dependency cycles in permissions. check mark for feature. check mark for feature See...
Permission error[5] Provides information about errors related to permissions that users get. check mark for feature. check mark for feature. See...
Profile configuration lifecycle[6] Provides information about design operations done on profiles from the client. check mark for feature. check mark for feature. See...
Report generation Provides information about the execution of reports. check mark for feature. check mark for feature check mark for feature See...
Retention policy trace[3] Provides information about the usage of the retention policy feature. check mark for feature. check mark for 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. check mark for feature. check mark for feature See...
Table index trace[3] Provides information about the addition or removal of a table index. check mark for feature. check mark for feature check mark for feature See...
Task scheduler lifecycle Provides information the execution of scheduled tasks. check mark for feature. check mark for feature See...
User checklists[5] Provides information about when the status of a user checklist changes check mark for feature. check mark for feature See...
Verbose logging enabled/disabled[5] Provides information about when additional logging is enabled and disabled from the client. check mark for feature. check mark for feature See...
Web service access key authentication Provides information about the authentication of web server access keys on web service requests. check mark for feature. check mark for feature See...
Web service publish failures[8] Provides information about the web services publish failures. check mark for feature. check mark for feature check mark for feature See...
Web service requests (incoming) Provides information about the execution time of incoming web service requests. check mark for feature. check mark for feature check mark for feature See...
Web service requests (outgoing ) Provides information about the execution time of outgoing web service requests. check mark for feature. check mark for feature check mark for feature 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.

9Introduced in Business Central 2023 release wave 2, version 23.

Enable Telemetry

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.

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 with Power BI

To make it simple to analyze Business Central telemetry, we've developed two Power BI apps available from the Microsoft commercial marketplace. One app is for telemetry on environments. The other one is for telemetry on apps/extensions (the telemetry defined in app.json). Both apps are free and open source but requires Power BI pro licenses to install.

For more information, go to Analyze and Monitor Telemetry with Power BI.

Analyze 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 set up alerts on telemetry events with various tools depending on your role.

If you're a project manager, product owner, or functional consultant, consider using the no-code tool Power BI Metrics for your alerting needs.

If you prefer more control, consider using one of these low-code tools for your alerting needs.

  • Azure Application Insights Alerts
  • Azure Logic Apps
  • Power Automate

For more information, go to Alert on Telemetry.

Telemetry sample code

Go to Business Central BCTech repository on GitHub.

Business Central telemetry FAQ

We have compiled a list of frequently asked questions (FAQ) on telemetry. See Telemetry FAQ

See also

Available signal in telemetry
Enable Telemetry
Control Telemetry Cost
Analyze Telemetry with Power BI
Analyze Telemetry with KQL
Alert on Telemetry
Telemetry FAQ
Feature Telemetry* codeunit
Custom telemetry with LogMessage Method
Working with Administration Tools
Business Central Administration Center