1

Is Application Insight working properly in Blazor server app? I have multiple application in .net core, all application logging data properly only I see an issue with BlazorServerApp. Sometimes, It will log page request sometimes it won't. Application Correlation also not working in BlazorServer app as describe here

I tested 2 scenarios

Scenario 1) Working properly - WebApp>>WebAPI>>WebAPI>>DB

enter image description here

.Net Core WebApp and API are logging data properly and I can easily correlate Nested API Calls.

Scenario 2) Not logging data properly - BlazorServerApp>>WebAPI>>WebAPI>>DB

Not able to see my Blazor page (/Student). I can see only few blazor page requests (/Index and JavaScript file)

enter image description here

For all the applications, I used below code to configure application Insight

public void ConfigureServices(IServiceCollection services)
    {
        services.AddApplicationInsightsTelemetry();
    }

Is there any specific setting or code change required for blazor Application?

Pankaj Rawat
  • 4,037
  • 6
  • 41
  • 73

1 Answers1

1

Try to add Microsoft.ApplicationInsights.DependencyCollector library.

Blazor server side is SPA application it is why you can see only root request. To track pages try this solution https://stackoverflow.com/a/66687175/2576452

Zaduvalo
  • 39
  • 3