AddApplicationInsightsTelemetry or UseApplicationInsights

AddApplicationInsightsTelemetry() and UseApplicationInsights() both are ways to add instrumentation capabilities to your application. These are "mutually exclusive" and you should use only one of them.

UseApplicationInsights() will automatically read and initialize configuration variables from appsettings.json and is the easiest way to get started with default settings.

AddApplicationInsightsTelemetry() is recommended for customized configuration.

Comments

Leave a Comment

All fields are required. Your email address will not be published.