best practice for Application Insights with Blazor Server

Denny Figuerres 0 Reputation points
2023-10-02T18:35:53.3266667+00:00

i have seen multiple posts about Blazor Web Assembly and Application Insights but almost zero on how to best use application insights with Blazor server.

is the only way to treat blazor server like web assembly ?

are there any guides on how to get full monitoring and logging for Blazor server ?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,484 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,776 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,211 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 48,881 Reputation points
    2023-10-02T21:00:43.61+00:00

    as Blazor Server is a single request to logging and Application Insights, you need to add you own.

    You can use injection

    https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/logging?view=aspnetcore-7.0

    you can also inject a TelemetryClient

    Hint: create a custom Blazor router that calls TelemetryClient.