Skip to content

Commit 03852fb

Browse files
committed
[AppInsights][AaronMax] updating code samples for connection strings
1 parent 958f8eb commit 03852fb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/azure-monitor/app/ilogger.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ By default, ASP.NET Core applications have an Application Insights logging provi
6565
public void ConfigureServices(IServiceCollection services)
6666
{
6767
services.AddApplicationInsightsTelemetry();
68-
// Configure the Connection String/Instrumentation key in appsettings.json
68+
// Configure the Connection String in appsettings.json
6969
}
7070

7171
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
@@ -146,13 +146,13 @@ namespace WebApplication
146146
})
147147
.ConfigureLogging((context, builder) =>
148148
{
149-
// Providing an instrumentation key is required if you're using the
149+
// Providing a connection string is required if you're using the
150150
// standalone Microsoft.Extensions.Logging.ApplicationInsights package,
151151
// or when you need to capture logs during application startup, such as
152152
// in Program.cs or Startup.cs itself.
153153
builder.AddApplicationInsights(
154-
configureTelemetryConfiguration: (config) => config.ConnectionString = context.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"],
155-
configureApplicationInsightsLoggerOptions: (options) => { }
154+
configureTelemetryConfiguration: (config) => config.ConnectionString = context.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"],
155+
configureApplicationInsightsLoggerOptions: (options) => { }
156156
);
157157

158158
// Capture all log-level entries from Program
@@ -194,7 +194,7 @@ namespace WebApplication
194194
public void ConfigureServices(IServiceCollection services)
195195
{
196196
services.AddApplicationInsightsTelemetry();
197-
// Configure the Connection String/Instrumentation key in appsettings.json
197+
// Configure the Connection String in appsettings.json
198198
}
199199

200200
// The ILogger<Startup> is resolved by dependency injection

0 commit comments

Comments
 (0)