best practice for Application Insights with Blazor Server

Denny Figuerres 5 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.
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | .NET | Blazor
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 82,321 Reputation points Volunteer Moderator
    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.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.