topic hubPlatform, DevOps & Performanceofficial - Microsoftreviewed - checked by Opus

Error telemetry

Error telemetry in Business Central AL covers how to analyze error-related events in Application Insights: error dialogs from the Error method, permission errors, user votes on error messages, and feature telemetry. It answers questions about event IDs, dimensions, KQL analysis and logging with the Telemetry AL module.

Path: Development > Programming in the AL language > Error handling > Error telemetry · tier official · system platform · narrative reviewed (checked by Opus)

Overview

This section is for developers who want to see how errors surface in production. Three pages describe specific telemetry signals sent to Application Insights: error dialogs shown when the Error method is called in AL code, permission errors when users lack required permissions, and votes users give on how helpful an error message was. The Error method and permission error pages describe the event dimensions and give KQL examples.

The fourth page covers feature telemetry. It uses the Telemetry AL module to track app health, feature uptake and usage, and to log errors through the FeatureTelemetry codeunit, with custom dimensions available.

Start with the Error method trace page for the general error signal, then the permission error page if the problem is about access. Use the vote telemetry page to judge error message quality, and feature telemetry to add your own logging.

Key points

  • Error method trace telemetry uses eventId RT0030 (error dialog displayed) and includes alErrorMessage and alStackTrace dimensions.
  • Permission error trace telemetry uses eventId RT0031 (permission error shown) with errorMessage, permissionArea, permissionType and alStackTrace dimensions.
  • Both error trace pages give KQL examples for Application Insights analysis. The Error method page also covers alert setup.
  • Error message vote telemetry records user feedback on how helpful an error message was in Application Insights. The page is associated with 2022 release wave 1.
  • Feature telemetry uses the FeatureTelemetry codeunit with LogUsage, LogError and LogUptake.
  • Uptake states that can be logged are Discovered, Set up, Used and Undiscovered.
  • Feature telemetry supports advanced filtering through common telemetry dimensions, plus a Telemetry Logger interface, custom dimensions and feature comparison across metrics.

Learn pages

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 4 Learn pages