MAUIverse MAUIverse

Adding Application Insights to a .NET MAUI App

Why is it worth wiring analytics into a MAUI app at all? Vladislav starts there, arguing that understanding user behavior and diagnosing problems quickly are part of shipping a good app. He then compares Application Insights with AppCenter, which many Xamarin developers had treated as the default, and positions Application Insights as the option with deeper analytics and performance monitoring.

The integration itself is short:

  1. Create an Application Insights resource in the Azure portal and copy its connection string.
  2. Add the Microsoft.Extensions.Logging.ApplicationInsights package.
  3. Initialize it in the app with that connection string.
  4. Log events with LogInformation and exceptions with LogError through an injected ILogger.

If you’re weighing telemetry options for a MAUI app, this gives you a concrete starting point. A GitHub repository with the full code is linked at the end.

View Source →

← Back to Community Feed

}