AspNetCore.Diagnostics.HealthChecks icon indicating copy to clipboard operation
AspNetCore.Diagnostics.HealthChecks copied to clipboard

Allow usage of trackAvailability() to use CUSTOM web tests in ApplicationInsightsPublisher

Open R3d-Dragon opened this issue 11 months ago • 0 comments

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

R3d-Dragon avatar Feb 10 '25 09:02 R3d-Dragon