Skip to content

Commit cb4d5dd

Browse files
authored
Merge pull request #194678 from AaronMaxwell/aaronmax-bootstrapping
[AppInsights][AaronMax] 90862
2 parents 173bc4f + d2d966d commit cb4d5dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

articles/azure-monitor/app/asp-net-core.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ For Visual Studio for Mac, use the [manual guidance](#enable-application-insight
129129
If you want to store the connection string in ASP.NET Core user secrets or retrieve it from another configuration provider, you can use the overload with a `Microsoft.Extensions.Configuration.IConfiguration` parameter. For example, `services.AddApplicationInsightsTelemetry(Configuration);`.
130130
In Microsoft.ApplicationInsights.AspNetCore version [2.15.0](https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore) and later, calling `services.AddApplicationInsightsTelemetry()` automatically reads the connection string from `Microsoft.Extensions.Configuration.IConfiguration` of the application. There's no need to explicitly provide the `IConfiguration`.
131131

132+
If `IConfiguration` has loaded configuration from multiple providers, then `services.AddApplicationInsightsTelemetry` prioritizes configuration from `appsettings.json`, irrespective of the order in which providers are added. Use the `services.AddApplicationInsightsTelemetry(IConfiguration)` method to read configuration from IConfiguration without this preferential treatment for `appsettings.json`.
133+
132134
## Run your application
133135

134136
Run your application and make requests to it. Telemetry should now flow to Application Insights. The Application Insights SDK automatically collects incoming web requests to your application, along with the following telemetry.
@@ -536,4 +538,4 @@ For the latest updates and bug fixes, see the [release notes](./release-notes.md
536538
* [Configure a snapshot collection](./snapshot-debugger.md) to see the state of source code and variables at the moment an exception is thrown.
537539
* [Use the API](./api-custom-events-metrics.md) to send your own events and metrics for a detailed view of your app's performance and usage.
538540
* Use [availability tests](./monitor-web-app-availability.md) to check your app constantly from around the world.
539-
* [Dependency Injection in ASP.NET Core](/aspnet/core/fundamentals/dependency-injection)
541+
* [Dependency Injection in ASP.NET Core](/aspnet/core/fundamentals/dependency-injection)

0 commit comments

Comments
 (0)