Developers can emit telemetry to Application Insights from AL code


This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Enabled for Public preview General availability
Admins, makers, marketers, or analysts, automatically Oct 1, 2020 Oct 1, 2020

Business value

App developers can now instrument their code both for their own use and to make it possible for reselling partners to troubleshoot potential issues.

Feature details

In this wave, we add a new function, Session.LogMessage, that has the following signature:

      EventID : String
    , Message: String
    , DataClassification: DataClassification
    , Scope: ExtensionPublisher|All
    , Verbosity: Verbosity 
    , Dimensions: Dictionary of [String, String]

If the Verbosity level is set to Normal and DataClassification is set to SystemMetadata, then the platform will emit telemetry. The value of the Scope parameter determines where telemetry will be sent. If set to ExtensionPublisher, telemetry is only sent to the Application Insights account specified in the app.json file. If set to All, telemetry is also sent to the Application Insights account specified in the Business Central administration center.

See also

Creating Custom Telemetry Traces for Application Insights Monitoring (docs)