Analyzing changelog configuration changes telemetry

INTRODUCED IN: Business Central 2023 release wave 2, version 23.0.

The Business Central changelog feature lets you track direct modifications a user makes to data in the database. You specify each table and field that you want the system to log, and then you activate the changelog. The changelog is based on changes that are made to data in the tables that you track.

Learn more in Auditing changes in Business Central.

Telemetry is logged for the following changes to the configuration of the changelog:

  • When a field is added to be tracked in the changelog.
  • When changelog configuration for a field is changed.
  • When a field is removed from tracking in the changelog.

These events use normal verbosity (severityLevel 1) and TelemetryScope::All. Their alCategory dimension is Change Log.

Field added to changelog configuration

Occurs when a field is added to be tracked in the changelog.

General dimensions

DimensionDescription or value
messageField added to changelog configuration
user_IdThe 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

DimensionDescription or value
aadTenantIdSpecifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
environmentNameSpecifies the name of the tenant environment. Learn more in Managing Environments.
environmentTypeSpecifies the environment type for the tenant, such as Production or Sandbox. Learn more in Environment Types.
eventIdAL0000LA2
alTableNumberSpecifies the ID of the table where the changed field is included.
alTableCaptionSpecifies the name of the table where the changed field is included.
alFieldNumberSpecifies the ID of the field to be logged.
alFieldCaptionSpecifies the name of the field to be logged.
alLogInsertionAre insertions logged? (Yes or No)
alLogModificationAre data modifications logged? (Yes or No)
alLogDeletionAre deletions logged? (Yes or No)

Sample KQL code (field added)

This KQL code can help you get started analyzing change log telemetry for added fields or if you want to alert on these changes.

// Field added to change log configuration
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions has 'AL0000LA2' // for performance
| where customDimensions.eventId == 'AL0000LA2'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// on which field in which table
, alTableNumber = customDimensions.alTableNumber
, alTableCaption = customDimensions.alTableCaption
, alFieldNumber = customDimensions.alFieldNumber
, alFieldCaption = customDimensions.alFieldCaption
// what was the configuration change
, alLogInsertion = customDimensions.alLogInsertion
, alLogModification = customDimensions.alLogModification
, alLogDeletion = customDimensions.alLogDeletion
// which user made the configuration change
, UsertelemetryId = user_Id

Field logging changed in changelog configuration

Occurs when changelog configuration for a field is changed.

General dimensions

DimensionDescription or value
messageField logging changed in changelog configuration
user_IdThe 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

DimensionDescription or value
aadTenantIdSpecifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
environmentNameSpecifies the name of the tenant environment. Learn more in Managing Environments.
environmentTypeSpecifies the environment type for the tenant, such as Production or Sandbox. Learn more in Environment Types.
eventIdAL0000LA1
alTableNumberSpecifies the ID of the table where the changed field is included.
alTableCaptionSpecifies the name of the table where the changed field is included.
alFieldNumberSpecifies the ID of the field to be logged.
alFieldCaptionSpecifies the name of the field to be logged.
alLogInsertionAre insertions logged? (Yes or No)
alLogInsertionOldWere insertions logged before? (Yes or No)
alLogModificationAre data modifications logged? (Yes or No)
alLogModificationOldWere data modifications logged before? (Yes or No)
alLogDeletionAre deletions logged? (Yes or No)
alLogDeletionOldWere deletions logged before? (Yes or No)

Sample KQL code (field logging changed)

This KQL code can help you get started analyzing change log telemetry for changed logging of fields or if you want to alert on these changes.

// Field logging changed in changelog configuration
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions has 'AL0000LA1' // for performance
| where customDimensions.eventId == 'AL0000LA1'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// on which field in which table
, alTableNumber = customDimensions.alTableNumber
, alTableCaption = customDimensions.alTableCaption
, alFieldNumber = customDimensions.alFieldNumber
, alFieldCaption = customDimensions.alFieldCaption
// what was the configuration change
, alLogDeletion = customDimensions.alLogDeletion
, alLogInsertionOld = customDimensions.alLogInsertionOld
, alLogInsertion = customDimensions.alLogInsertion
, alLogDeletionOld = customDimensions.alLogDeletionOld
, alLogModification = customDimensions.alLogModification
, alLogModificationOld = customDimensions.alLogModificationOld
// which user made the configuration change
, UsertelemetryId = user_Id

Field removed from changelog configuration

Occurs when a field is removed from tracking in the changelog.

General dimensions

DimensionDescription or value
messageField removed from changelog configuration
user_IdThe 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

DimensionDescription or value
aadTenantIdSpecifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
environmentNameSpecifies the name of the tenant environment. Learn more in Managing Environments.
environmentTypeSpecifies the environment type for the tenant, such as Production or Sandbox. Learn more in Environment Types.
eventIdAL0000LA3
alTableNumberSpecifies the ID of the table where the changed field is included.
alTableCaptionSpecifies the name of the table where the changed field is included.
alFieldNumberSpecifies the ID of the field to no longer be logged.
alFieldCaptionSpecifies the name of the field to no longer be logged.
alLogInsertionWere insertions logged for the removed field? (Yes or No)
alLogModificationWere data modifications logged for the removed field? (Yes or No)
alLogDeletionWere deletions logged for the removed field? (Yes or No)

Sample KQL code (field removed)

This KQL code can help you get started analyzing change log telemetry for removed fields or if you want to alert on these changes.

// Field removed from changelog configuration
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions has 'AL0000LA3' // for performance
| where customDimensions.eventId == 'AL0000LA3'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// on which field in which table
, alTableNumber = customDimensions.alTableNumber
, alTableCaption = customDimensions.alTableCaption
, alFieldNumber = customDimensions.alFieldNumber
, alFieldCaption = customDimensions.alFieldCaption
// which user made the configuration change
, UsertelemetryId = user_Id

Performance effect of enabling change logging on a table

There's a performance overhead involved in having change log enabled on a table. First, there are extra writes to the database when inserting, modifying, or deleting data. Each of these operations triggers an insert statement per field that's enabled change logging. Second, the size of the change log table can impact the performance of admin operations such as copy company, export, and backup/restore of environments.

It's recommended to critically evaluate what fields should be tracked in the change log and also to do extra testing with realistic data before rolling out configuration changes to the setup of the change log.

For more information, see Change log.

Auditing Changes in Business Central
Field monitoring telemetry
Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights
Alert on telemetry