Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

Latest commit

 

History

History
46 lines (32 loc) · 2.41 KB

ai-tracker.md

File metadata and controls

46 lines (32 loc) · 2.41 KB

Application Insights tracker

The Application Insights tracker, allows to track the response information from the liveness pulses as custom events in Application Insights with this information:

BeatPulse info on Application insights

Part of the info we store in Application Insights is the response time in milliseconds for each of the pulses tracked as a metric for the event, with this information, and the new Metrics (preview) blade in Azure Portal, you can create your own charts to track slow response from pulses over time, just create a new metric from the pulse information, with the average time, split by the name of the pulse, which is also part of the information stored in the custom event:

BeatPulse metric in Application insights

This charts can be pinned on your Azure Dashboards also.

BeatPulse metric in Azure Dashboard

One last way to explode this information is via Application Insights Analytics, which allows to query information on application Insights and create graphics based on this analytics queries, like this one which shows average response time for each pulse per day, in the last two days.

customEvents
| where name == "BeatPulse"
| summarize avg(todouble(customMeasurements['BeatPulse:ResponseTime'])) by format_datetime(timestamp, 'yyyy-MM-dd')  , tostring(customDimensions.Name)

BeatPulse metric in Azure Application Insights Analytics

Installation

Install-Package BeatPulse.ApplicationInsightsTracker

Application Insights tracker configuration

Add the tracker in the configuration section where you configured your BetPulseService,

    public class Startup
    {       
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddBeatPulse(setup =>
            {
                setup.AddApplicationInsightsTracker();
            });
        }
    }