1
votes

I want to send emails through application insight for certain events like validation failure, mandatory field not present etc.

I know Application insight doesn't have facility to support Email facility directly, but it can send an alert when a metric crosses a threshold.

Alerts can be set on custom metrics, though not custom events. Write some code to increase a metric when the event occurs.

I am referring below link to achieve email sending functionality.

https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/application-insights/app-insights-how-do-i.md

But I am facing one problem. Alarm option is not in metric. Please see below images.

enter image description here

enter image description here

1
You will need to include the type of application you are instrumenting, an app service? a worker role?Mick
How to include type of application?Ashutosh B Bodake

1 Answers

5
votes

You can create an automated flow to query your events and send you an email whenever the query result passes some threshold.
The Application Insights Connector which works both for Flow and Microsoft Logic Apps was created just for that, and can be defined on any query result from any document type (event, metric or even traces).
Step-by-step documentation on how to create your own flow are here