Analyzing Azure Function Integration Telemetry

Azure Function integration telemetry gathers data about the success or failure of calls from Business Central to Azure Functions using the Azure Function module in the System Application.

Failed operations result in a trace log entry that includes a reason for the failure.

Custom dimensions available in all events

The following dimensions are available in all events described below and not included in the individual event documentation:

Dimension Description or value
aadTenantId

Note

Azure Active Directory is now Microsoft Entra ID. Learn more

Specifies 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.
alCountryCode Specifies the localization for the environment, such as US or DK.
alFunctionHost The base URL for the Azure function called from Business Central
alIsAdmin Whether the current user is a tenant admin or delegated admin.
alIsEvaluationCompany Whether the current company is an evaluation company.
alTenantLicenseState The license state of the tenant, such as Paid, Trial, Suspended, or Warning.
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.
environmentName Specifies the name of the tenant environment. See Managing Environments.
environmentType Specifies the environment type for the tenant, such as Production or Sandbox. See Environment Types.

Request sent to Azure function succeeded

Occurs when a request to an Azure function hosted from the URL {alFunctionHost} succeeded.

General dimensions

Dimension Description or value
message Request sent to Azure function succeeded: {alFunctionHost}

Custom dimensions

Dimension Description or value
eventId AL0000I74
alStatusCode The HTTP status code for the request.

Request sent to Azure function failed

Occurs when a request to an Azure function hosted from the URL {alFunctionHost} failed.

General dimensions

Dimension Description or value
message Request sent to Azure function failed: {alFunctionHost}

Custom dimensions

Dimension Description or value
eventId AL0000I7P
alStatusCode The HTTP status code for the request.

Sample KQL code

This KQL code can help you get started analyzing and alerting on request failures to Azure functions:

traces
| where timestamp > ago(5d) // adjust as needed
| where customDimensions.eventId == 'AL0000I7P'
| project timestamp
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
, requestStatusCode = customDimensions.alStatusCode
, functionHost = customDimensions.alFunctionHost

To learn more about how to setup alerting on Business Central telemetry, see Alert on Telemetry.

Authorization failed to Azure function

Occurs when the environment was scheduled to be updated, but it wasn't possible to start the update within the update window defined in the Business Central admin center. For more information about the update window in the admin center, see Managing Updates in the Business Central Admin Center.

General dimensions

Dimension Description or value
message Authorization failed to Azure function: {alFunctionHost}

Custom dimensions

Dimension Description or value
eventId AL0000I75
alErrorText The reason for the failure.

Sample KQL code

This KQL code can help you get started analyzing and alerting on failures to authorize to Azure functions:

traces
| where timestamp > ago(5d) // adjust as needed
| where customDimensions.eventId == 'AL0000I75'
| project timestamp
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
, errorText = customDimensions.alErrorText
, functionHost = customDimensions.alFunctionHost

To learn more about how to setup alerting on Business Central telemetry, see Alert on Telemetry.

See also

Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights
Alert on Telemetry
Connecting to Azure Functions
Overview of the Application