Allow usage of trackAvailability() to use CUSTOM web tests in ApplicationInsightsPublisher
The current implementation of the ApplicationInsightsPublisher publishes healthCheck results through the TelemetryClient.TrackEvent() method.
As a result, healthCheck metrics are stored within the "customEvents" table of application insights. The built-in web-test (availability) functionality of Azure ApplicationInsights cannot be used with this approach.
What would you like to be added:
Provide an option to publish healthCheck metrics through the TelemetryClient.TrackAvailability() method.
Why is this needed: With this approach, healthCheck metrics are stored within the "AvailabilityResults" table in application insights. In addition, a CUSTOM web-test will automatically be created in Azure Application Insights which allows to monitor your application easily.
For more details, please have a look at the official documentation: https://learn.microsoft.com/en-us/azure/azure-monitor/app/availability?tabs=track#create-an-availability-test