Analyzing extension update telemetry

INTRODUCED IN: Exception telemetry was introduced in Business Central 2020 release wave 1, version 16.2. Upgrade tag telemetry was introduced in Business Central 2021 release wave 1, version 18.1.

Extension upgrade telemetry gathers information about operations that can occur during extension upgrades:

  • Upgrade code failures

    The telemetry provides information about exceptions that are thrown by code run by upgrade codeunits. The trace events include the following information:

    • The codeunit that threw the exception.
    • AL stack trace.
    • Exception message.
  • Upgrade tag usage

    The telemetry provides information about calls to the AL methods HasUpgradeTag and SetUpgradeTag. These methods are provided by codeunit 9999 Upgrade Tag in the System Application extension. Upgrade tags are used to control when upgrade code is run. Learn more in Using upgrade tags to control upgrade code. This data can help you identify, troubleshoot, and resolve issues in upgrade code.

The telemetry helps you troubleshoot and resolve code issues that block the data upgrade of per-tenant and Marketplace extensions.

Extension update failed: exception raised in extension

Occurs when an extension upgrade fails because of an exception in an upgrade codeunit.

General dimensions

DimensionDescription or value
messageExtension Update Failed: exception raised in extension {extensionName} by {companyName} (updating to version {extensionTargetedVersion})
severityLevel3

Custom dimensions

DimensionDescription or value
eventIdRT0010
alObjectIdThe ID of the AL object that was run by request
alStackTraceThe stack trace in AL
companyNameThe display name of the Business Central company that was used at time of execution
extensionNameThe name of the extension that was being upgraded
extensionIdThe AppID of the extension that was being upgraded
extensionTargetedVersionThe new version of the extension being upgraded
extensionVersionThe version of the extension being upgraded to
failureReasonThe exception that was thrown by the upgrade code. Some exception messages can contain customer data. As a precaution, Business Central only emits information that's classified as SystemMetadata. Exception messages that contain other data classifications, like customer data, aren't shown. Instead, the following message is shown: "Message not shown because the NavBaseException(string, Exception, bool) constructor was used."
failureTypeDataUpdate

Common custom dimensions

The following table explains other custom dimensions that are common to all extension update traces.

DimensionDescription or value
aadTenantIdThe 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.
componentDynamics 365 Business Central Server
componentVersionThe version number of the component that emits telemetry (see the component dimension)
environmentNameThe name of the tenant environment. Learn more in Managing environments. This dimension isn't included for Business Central on-premises environments.
deprecatedKeysA comma-separated list of keys that have been deprecated. We recommend that you update any queries that use these keys to use the new key names.
environmentTypeThe environment type for the tenant, such as Production, Sandbox, Trial. Learn more in Environment types.
telemetrySchemaVersionThe version of the Business Central telemetry schema

Upgrade tag searched for

Occurs when the HasUpgradeTag method in codeunit 9999 Upgrade Tag checks for a tag during an extension upgrade and the tag isn't found.

General dimensions

DimensionDescription or value
messageUpgrade tag searched for: {alUpgradeTag}
severityLevel1

Custom dimensions

DimensionDescription or value
eventIdAL0000EJ9
alCategoryALUpgrade
alCompanyNameThe company for which the upgrade tag was checked. An empty value indicates a database-wide tag.
alDataClassificationOrganizationIdentifiableInformation
alObjectId9996
alObjectNameUpgrade Tag Impl.
alUpgradeTagThe upgrade tag that was input to the HasUpgradeTag method
alExecutionContextThe context that the upgrade code was running in. The dimension has the following values:<ul><li> Install indicates the code was run during the installation of the extension.</li><li>Upgrade indicates the code was run during the upgrade of the extension.</li><li>Normal indicates the code was run by an operation other than extension installation or upgrade. For example, when a new company was added.</li></ul>
alValuefalse, because this event is emitted when the upgrade tag isn't found.
extensionNameSystem Application
extensionIdThe ID of the System Application extension
extensionPublisherThe publisher of the System Application extension
extensionVersionThe version of the System Application extension
See common custom dimensions

Upgrade tag set

Occurs when codeunit 9999 Upgrade Tag sets an upgrade tag. This event can also occur outside an extension upgrade, such as when a company is created.

General dimensions

DimensionDescription or value
messageUpgrade tag set: {alUpgradeTag}
severityLevel1

Custom dimensions

DimensionDescription or value
eventIdAL0000EJA
alCategoryALUpgrade
alCompanyNameThe company for which the upgrade tag was set. An empty value indicates a database-wide tag.
alDataClassificationOrganizationIdentifiableInformation
alObjectId9996
alObjectNameUpgrade Tag Impl.
alUpgradeTagThe upgrade tag that was set by the SetUpgradeTag method.
alExecutionContextThe context that the upgrade code was running in. The dimension has the following values:<ul><li> Install indicates the code was run during the installation of the extension.</li><li>Upgrade indicates the code was run during the upgrade of the extension.</li><li>Normal indicates the code was run by an operation other than extension installation or upgrade. For example, when a new company was added.</li></ul>
extensionNameSystem Application
extensionIdThe ID of the System Application extension
extensionPublisherThe publisher of the System Application extension
extensionVersionThe version of the System Application extension
See common custom dimensions

Upgrading Extensions
Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights