Connecting Blazor server to Application Insights

David Thielen 2,776 Reputation points
2024-07-10T15:57:25.93+00:00

Hi all;

Is this still the latest/greatest way to integrate Application Insights with my Blazor server app? I want to use this for figuring out the hot spots when load testing including the SQL queries (via Entity Frameworks).

And while that link has what I think is a deprecated call, is the following how I get them connected?

builder.Logging.AddApplicationInsights();

builder.Services.AddApplicationInsightsTelemetry(); 

thanks - dave

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,012 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,494 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 26,951 Reputation points Microsoft Employee
    2024-07-12T20:08:41.63+00:00

    Hi @David Thielen,

    I know you've asked similar question here, but short answer is yes; that's how you would connect Application Insights to your ASP.NET server app i.e. Blazor Server.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful