Adding Alerts to Azure Application Insight Events for D365FSC

Let’s take a look at how you can place alerts around telemetry data being ingested by Azure Application Insights. We will specifically be looking at data coming from Dynamics 365 Finance & Supply Chain but this guide will apply to any application that utilizes Application Insights as its logging back end.

Scenario

For our example, let’s say you want to get an alert anytime a user navigates to a particular set of forms within D365FSC.

Creating an Azure Application Insights Alert

1) Within an Azure Application Insight resource you can find the ‘alert’ area by navigating to Monitoring -> Alerts

2) To start, the first thing you need to create is an ‘Alert Rule’ which can be done by navigating to Create -> Alert Rule

3) There are a lot of different ‘signals’ that you can use as a data source for your alert rule that come pre-packaged from Microsoft but the option we will use for our case is ‘Custom Log Search’ – this will allow us to create a specific query for the form(s) we want to include our query

4) Now we get to the main configuration of the Alert Rule, here we can see the Signal Name is set to ‘Custom Log Search’ from the previous step and now we need to supply the actual query we want to use:

For our example, let’s say we want to get an alert anytime a user navigates to either the Customer or Vendor Terms of Payment forms. The menu item displays that control these forms are ‘PaymTerm’ and ‘CustPaymTerm’ so let’s utilize the PageViews telemetry data and then place a WHERE clause on the query for those forms:

Once we are satisfied with our query we can set the other configuration options. The ‘Measurement’ area allows us to set the measurement we want to use for our alert, in our case we just want to do a simple count of table rows of our query but this is where you could potentially do data aggregation.

Another area we will set is the ‘Alert Logic’ which allows us to set what conditions have to be met for an alert to be fired. In our case, if there is any entry in our query (threshold value > 1) we want the alert to be fired.

5) Now we get to decide what action should be taken when our alert is ‘fired’. You can either use an ‘Action Group’ (which is an Azure concept on who should be notified for a particular action) or you can use a one of the ‘quick actions’ one of them being having an email be sent, which is the one I went with. This is also where you can choose what the Email Subject should be:

If you choose to create an action group you have some additional options for notifications of an alert including having the notification pushed to the Azure mobile app:

6) Once the setup is complete you will be presented with an overview of the alert rule you are looking to create:

7) Once configured, you will see this alert rule show up in the Alerts area of the Application Insights resource. If we now have a user navigate to either of the Payment Term pages we listed earlier, you can see the ‘Alert Condition’ in this case is ‘Fired’ which means that the alert was triggered and the actions of the alert were executed:

8) If we check our email now, we will see that indeed we did get an email from the alert rule.

If we want to see the details of the access you could click on the ‘Investigate’ link which will take you the App Insights resource to be able to query it further.

9) One cool feature is that back on the alert details there is built in functionality to have an Azure administrator review this access and either ‘Acknowledge’ or ‘Close’ the alert with a Comment if desired:

Conclusion

Hopefully this shows the overall process of setting up an alert for Azure Application Insights, one area I would like to do a little bit more digging is expanding this usage into custom telemetry events as well which expands the usage quite a bit and could cover a lot of other scenarios.

 

The post Adding Alerts to Azure Application Insight Events for D365FSC appeared first on Alex Meyer.

Original Post https://alexdmeyer.com/2025/10/16/adding-alerts-to-azure-application-insight-events-for-d365fsc/

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Follow
Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...