A Blazor wrapper for Microsoft Application Insights enabling telemetry collection in Blazor WebAssembly and Blazor Web App projects.
BlazorApplicationInsights is a .NET library that provides seamless integration of Microsoft Application Insights into Blazor web applications. It enables developers to collect telemetry data such as page views, events, exceptions, and dependencies from both Blazor WebAssembly and Blazor Web App projects, facilitating performance monitoring and user behavior analysis. The library abstracts the complexities of the JavaScript SDK while maintaining full API compatibility.
Blazor developers building web applications with .NET 8/9 who need to integrate Microsoft Application Insights for monitoring and analytics. This includes teams working on Blazor WebAssembly standalone apps and Blazor Web Apps requiring automatic telemetry collection.
Developers choose BlazorApplicationInsights because it offers a native Blazor experience with automatic page view tracking, ILoggerProvider integration for WebAssembly, and comprehensive coverage of Application Insights JavaScript APIs. Its unique selling point is the ability to programmatically update settings like the connection string after initialization and set authenticated user context without manual JavaScript interop.
Application Insights for Blazor web applications
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically triggers Track Page View on route changes within the application, eliminating manual tracking for navigation events as highlighted in the features section.
Provides an ILoggerProvider that sends all application logs to Application Insights for Blazor WebAssembly projects, seamlessly integrating with .NET's logging system, though it's WebAssembly-only.
Supports a wide range of Application Insights JavaScript APIs including TrackEvent and telemetry initializers, ensuring full compatibility with advanced telemetry scenarios as listed in the README.
Allows programmatic updates to settings like the connection string after initialization, enabling runtime changes without app restart, demonstrated in the configuration examples.
Requires adding a lengthy, complex JavaScript snippet to index.html for Blazor WebAssembly standalone apps, which is error-prone and maintenance-heavy as detailed in the installation steps.
The ILoggerProvider integration is only available for WebAssembly, not for server-side Blazor components in Web Apps, potentially missing server-generated telemetry data.
Tightly coupled with Microsoft Application Insights, making it difficult to switch to alternative monitoring tools without significant code changes and reimplementation.