asp.net-coreblazor-server-sideazure-application-insights

Where do custom metrics I did not set come from


I explicitly track 4 metrics in my app and they all show up in the Azure Application Insights custom metrics. But this list of metrics also has 3 metrics I did not set:

What are these and where did they come from? I do have Health Checks enabled. Also, the 1st & 3rd of these has numbers while the 2nd is flatlined at 0.

enter image description here


Solution

  • Thanks @Peter Bons's for the Answer.

    In addition, Please check the below Workaround.

    I have created a sample Application Insights with default settings.

    I haven't configured anything neither enabled Application Insights for my App.

    Initially I don't see any metrics which you have mentioned.

    enter image description here

    AFAIK, HealthReportEntryDuration and TotalDuration are related to HealthCheck. Based on the installed packages related to the health check they might have enabled.

    My Program.cs file:

    builder.Services.AddApplicationInsightsTelemetry(new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions
    {
        ConnectionString = builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"]
    });
    builder.Services.AddHealthChecks()
        .AddCheck("SampleCheck", () => HealthCheckResult.Healthy(), tags: new[] { "sample" })
        .AddApplicationInsightsPublisher(); 
    

    As per this MSDoc, totalDuration comes under Browser metrics.

    To collect browser metrics, your application must be instrumented with the Application Insights JavaScript SDK.

    so configured JavaScript SDK as well.

    enter image description here

    Also refer this MSDoc on Monitoring data reference -Azure Monitor for more details.