Skip to content

Commit 9559aef

Browse files
committed
[tour] adjust text and line numbers
1 parent 703b12c commit 9559aef

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.tours/dotnet8/logging/.tours/02-logging-to-application-insights.tour

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"title": "Connecting to Application Insights",
1111
"file": "../../../src/dotnet8/logging/AzFuncUni.Logging/local.settings.json",
1212
"description": "The `APPLICATIONINSIGHTS_CONNECTION_STRING` app setting selects the connection string used to connect to Azure Application Insights.\r\n\r\nYou can find the value for this setting by navigating to the Azure Portal, and locating the Application Insights resource under considration. There, notice `Essentials` section, at the top of the center pane.\r\nThat’s where you can find the `Instrumentation Key` and `Connection String` properties.",
13-
"line": 7
13+
"line": 6
1414
},
1515
{
1616
"title": "Configuring the Functions Runtime host",
@@ -21,7 +21,7 @@
2121
{
2222
"title": "Configuring the log levels",
2323
"file": "../../../src/dotnet8/logging/AzFuncUni.Logging/host.json",
24-
"description": "The Functions Runtime host receives requests for logging from your function app worker process using gRPC.\r\n\r\nThe `logging/loglevel` section from the `host.json` file allows you to filter logs based on their categories.",
24+
"description": "The Functions Runtime host uses the `host.json` file to configure configure logging for its own activity, including the behaviour of your input bindings.\r\n\r\nIn this lesson, were are also sharing the `host.json` log configuration for the worker process itself. That’s where you define the log level associated with each category.",
2525
"line": 12
2626
},
2727
{
@@ -40,24 +40,30 @@
4040
"title": "Using statements",
4141
"file": "../../../src/dotnet8/logging/AzFuncUni.Logging/Program.cs",
4242
"description": "These _using_ statements at the top of the source file are required to enable logging to Application Insights.\r\n\r\nNote that most of those statements are generic-enough; that’s because most features are packaged using extension classes located in a limited number of well-known namespaces.",
43-
"line": 5
43+
"line": 6
44+
},
45+
{
46+
"title": "Reading and configuring log levels and categories",
47+
"file": "../../../src/dotnet8/logging/AzFuncUni.Logging/Program.cs",
48+
"description": "Those instructions load the `logging` section from the `host.json` configuration file into a temporary variable.Then, passing this variable to `Logging.AddConfiguration()` configures log levels and categories accordingly.",
49+
"line": 19
4450
},
4551
{
4652
"title": "Logging to Application Insights",
4753
"file": "../../../src/dotnet8/logging/AzFuncUni.Logging/Program.cs",
4854
"description": "Those instructions enable logging to ApplicationInsights.\r\n\r\nThe `AddApplicationInsightsTelemetryWorkerService` method enables connection to Application Insights from _worker_ processes such as non-HTTP workloads, background tasks and console applications and is not specific to Function Apps.\r\n\r\nThe `ConfigureFunctionsApplicationInsights` method is a simple method provided by the Azure Functions .NET Worker SDK to properly setup the Function App for logging to Application Insights.",
49-
"line": 15
55+
"line": 25
5056
},
5157
{
5258
"title": "Remove logging constraints for debugging purposes",
5359
"file": "../../../src/dotnet8/logging/AzFuncUni.Logging/Program.cs",
5460
"description": "In order to help reduce cost of your cloud infrastructure, the Application Insights SDK adds a default logging filter that instructs `ILogger` to capture logs with a severity of `Warning` or more.\r\n\r\nIn this lesson, that rule is removed so that logging using lower levels, such as `Information` can be sent and recorded into Application Insights.",
55-
"line": 27
61+
"line": 34
5662
},
5763
{
5864
"title": "Selecting a category for logging",
5965
"file": "../../../src/dotnet8/logging/AzFuncUni.Logging/HelloWorldHttpTrigger.cs",
60-
"description": "Most of the work so far involved installing NuGet dependencies and configuring them appropriately upon startup of the worker process.\r\n\r\nIn the program, a developer can use the `ILogger` abstraction to focus on logging – what, and how – without worrying about specific details related to where those logs are sent.\r\n\r\nThe specific instance of that logger for the class is specified as a generic parameter to the `ILogger<T>` interface. Here, this ties the logger to a _Category_ that is the fully qualified name of the class, _i.e_ `AzFuncUni.Logging.HelloWordHttpTrigger`.",
66+
"description": "Most of the work so far involved installing NuGet dependencies and configuring them appropriately upon startup of the worker process.\r\n\r\nIn the program, a developer can use the `ILogger` abstraction to focus on logging – what, and how – without worrying about specific details related to where those logs are sent.\r\n\r\nThe specific instance of that logger for the class is specified as a generic parameter to the `ILogger<T>` interface. Here, this ties the logger to a _CategoryName_ that is the fully qualified name of the class, _i.e_ `AzFuncUni.Logging.HelloWordHttpTrigger`.",
6167
"line": 10
6268
},
6369
{

0 commit comments

Comments
 (0)