It very easy to setup and use Azure Insights in Business Central.
You can read how to set it up here
But how to actually analyze the logs in Azure?
First I’ll set up some custom events that I want to send to Azure.
Little wrapper around the Session.LogMessage so its easier to use:
local procedure LogMessage(EventId: Text; Message: Text; Dimension: Text) var TelemetryDimensions: Dictionary of [Text, Text]; begin TelemetryDimensions.