Dynamics 365 Business Central SaaS: How to Send telemetry to Microsoft Azure Application Insights

Dynamics 365 Business Central

Hi Readers.
I recently got an new Azure environment, so this time we will discuss how to send telemetry to Microsoft Azure Application Insights.
This feature applies to Business Central 2019 release wave 2 and later. You can set up your environments to send telemetry to Application Insights. Application Insights is a service hosted within Azure that gathers telemetry data for analysis and presentation.

Pre-requisites:
・Business Central Admin Center
・Application Insights resource in Azure

Creating Application Insights

If you don’t already have one, get a subscription to Microsoft Azure.

1. Sign into Azure Portal.

2. Enter Application Insights in search, and then choose the related link.

3. Choose Add to create an new Application Insights resource.

4. Enter Resource Group, Name, Log Analytics Workspace, and then choose Review + create

PS: If Log Analytics Workspace does not exist, you must create a new one.

5. Choose Create.

6. Choose Go to resource.

7. The Application Insights resource will be assigned an instrumentation key. Copy this key because you’ll need it to enable Application Insights in the Business Central administration center.
For example: b83c55f5-6e04-4c87-ae4a-91d8d2040db3 (I will delete it after the post is finished.)

Enable application insights in Business Central

1. Sign into Dynamics 365 Business Central Admin Center

2. Choose the Environment Name you want to enable application insights.

3. Choose Define caption under Application Insights Key.

4. Enable application insights and set Instrumentation Key generated in Azure.
You can use the same Application Insights resource for multiple tenants and their different environments.

5. Choose Save.

Caution: Applying this key requires a restart to the environment. We recommend doing this when no users are active in Business Central.

Application Insights Key will be saved and the setting is all complete.

Some examples of Application Insights

Sorry for not much data in my test environment. I recommend that you access the customer’s environment or your own environment to test it

Application Insights Dashboard:

Users:

Sessions:

Events:

Metrics:

Logs:

Transaction search:

Other Tips

1. If the Application Insights resource is tied to your partner account, and you end the relationship with a customer where you have set up telemetry based on your account’s instrumentation key, you must remove the instrumentation key while you still have access to that customer’s Business Central administration center.

2. Sending Extension Telemetry to Azure Application Insights
With Business Central 2020 release wave 2 and later, Application Insights can also be enabled on a per-extension basis.
Add the Application Insights Key to the extension’s app.json

When done, build the extension package, then publish and install it as usual. When the extension is run from Business Central, Application Insights gathers the telemetry data for viewing and analyzing.
For Details: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-application-insights-for-extensions

3. You can enable Application Insights for Tenant Telemetry On-Premises

4. Available telemetry list in Application Insights.

END

Find out more about Environment Telemetry from Microsoft Docs.

Hope this will help.

Thanks for your reading.

ZHU

コメント

Copied title and URL