APPLIES TO: Business Central 2022 release wave 1 and later
When a user gets an error dialog while working in Business Central, a telemetry signal is emitted, which can be logged in an Azure Application Insights resource.
This telemetry data lets you identify and analyze calls to the Error method from AL code and errors raised by the platform. You can also set up alerts in Azure Application Insights to get notified if many users experience errors.
Error dialog displayed
Occurs when an error is sent to the client for display, including errors raised by the AL Error method and by the platform.
General dimensions
| Dimension | Description or value |
|---|---|
| message | Error dialog shown: {failureReason} |
| severityLevel | 3 |
| user_Id | The user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users. |
Custom dimensions
| Dimension | Description or value |
|---|---|
| eventId | RT0030 |
| alErrorMessage | The error message, with private information removed. For calls to Error(String), the error string from AL code is shown only if the string is a Label or TextConst data type. For other nonempty strings, Use ERROR with a text constant to improve telemetry details is shown instead. Substitution values aren't included in the diagnostic text.Messages from Error(ErrorInfo) are also subject to privacy filtering. Some messages can contain customer data. As a precaution, Business Central only emits information that's classified as SystemMetadata. Information that belongs to other data classifications, like customer data, isn't shown. A redaction message is shown instead. |
| alDetailedErrorMessage | The detailed error message, with private information removed. |
| alEnglishLanguageDiagnosticsMessage | The error message in English, regardless of the user's client language. This dimension is available in version 22.0 and was backported to version 21.4. |
| alObjectId | Specifies the ID of the AL object. |
| alObjectType | Specifies the type of the AL object. |
| alStackTrace | The stack trace in AL. |
| clientType | Specifies the type of client that opened the session, such as Background or Web. For a list of the client types, see ClientType Option Type. |
| companyName | The current company name. |
| failureReason | Dialog means the error was the result of an error method call in AL. Errors thrown by the platform have other reasons, like MetadataNotFound. |
The following table explains other custom dimensions that are common to all error telemetry.
| Dimension | Description or value |
|---|---|
| aadTenantId | The Microsoft Entra tenant ID that's used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common. |
| component | Dynamics 365 Business Central Server |
| componentVersion | The version number of the component that emits telemetry (see the component dimension) |
| environmentName | The name of the tenant environment. This dimension isn't included for Business Central on-premises environments. Learn more in Managing environments. |
| environmentType | The environment type for the tenant, such as Production, Sandbox, Trial. Learn more in Environment types. |
| extensionName | Specifies the name of the extension/app. |
| extensionPublisher | Specifies the publisher of the extension/app. |
| extensionVersion | Specifies the version of the extension. |
| extensionId | Specifies the ID of the extension/app. |
| telemetrySchemaVersion | The version of the Business Central telemetry schema |
Sample KQL code (error dialogs)
This KQL code can help you get started analyzing which error dialogs users see:
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'RT0030'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// in which extension/app
, extensionId = customDimensions.extensionId
, extensionName = customDimensions.extensionName
, extensionVersion = customDimensions.extensionVersion
, extensionPublisher = customDimensions.extensionPublisher
// in which object
, alObjectId = customDimensions.alObjectId
, alObjectName = customDimensions.alObjectName
, alObjectType = customDimensions.alObjectType
// which user got the error
, usertelemetryId = case(
toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry id was introduced in the platform in version 20.0
, 'N/A'
)
// error information
, clientType = customDimensions.clientType
, errorMessageInUsersLanguage = customDimensions.alErrorMessage
, errorMessageInEnglish = customDimensions.alEnglishLanguageDiagnosticsMessage // Available in version 22.0 and backported to version 21.4.
, alStackTrace = customDimensions.alStackTrace
, failureReason = customDimensions.failureReason
Understanding the error dialog
To effectively help users mitigate any issues they might encounter, we recommend learning about the different parts of the error dialog, including how to interpret the AL stack trace. Learn more in Understanding the error dialog.
Related information
Dialog.Error Method Dialog.Error Method
Understanding the error dialog
Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights