Skip to content

Commit 399d6c2

Browse files
Links: AspNetCore - Pass 1 (#19880)
* Links: AspNetCore - Pass 1 * Apply suggestions from code review * Update aspnetcore/fundamentals/routing.md Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
1 parent 76e05bf commit 399d6c2

33 files changed

Lines changed: 110 additions & 111 deletions

aspnetcore/data/ef-rp/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Create *Models/Enrollment.cs* with the following code:
173173

174174
The `EnrollmentID` property is the primary key; this entity uses the `classnameID` pattern instead of `ID` by itself. For a production data model, choose one pattern and use it consistently. This tutorial uses both just to illustrate that both work. Using `ID` without `classname` makes it easier to implement some kinds of data model changes.
175175

176-
The `Grade` property is an `enum`. The question mark after the `Grade` type declaration indicates that the `Grade` property is [nullable](https://docs.microsoft.com/dotnet/csharp/programming-guide/nullable-types/). A grade that's null is different from a zero grade&mdash;null means a grade isn't known or hasn't been assigned yet.
176+
The `Grade` property is an `enum`. The question mark after the `Grade` type declaration indicates that the `Grade` property is [nullable](/dotnet/csharp/programming-guide/nullable-types/). A grade that's null is different from a zero grade&mdash;null means a grade isn't known or hasn't been assigned yet.
177177

178178
The `StudentID` property is a foreign key, and the corresponding navigation property is `Student`. An `Enrollment` entity is associated with one `Student` entity, so the property contains a single `Student` entity.
179179

@@ -766,4 +766,4 @@ In the next tutorial, basic CRUD (create, read, update, delete) operations are e
766766
> [!div class="step-by-step"]
767767
> [Next](xref:data/ef-rp/crud)
768768
769-
::: moniker-end
769+
::: moniker-end

aspnetcore/fundamentals/configuration/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ Before the app is configured and started, a *host* is configured and launched. T
716716

717717
## Default host configuration
718718

719-
For details on the default configuration when using the [Web Host](xref:fundamentals/host/web-host), see the [ASP.NET Core 2.2 version of this topic](/aspnet/core/fundamentals/configuration/?view=aspnetcore-2.2).
719+
For details on the default configuration when using the [Web Host](xref:fundamentals/host/web-host), see the [ASP.NET Core 2.2 version of this topic](?view=aspnetcore-2.2).
720720

721721
* Host configuration is provided from:
722722
* Environment variables prefixed with `DOTNET_` (for example, `DOTNET_ENVIRONMENT`) using the [Environment Variables configuration provider](#environment-variables). The prefix (`DOTNET_`) is stripped when the configuration key-value pairs are loaded.
@@ -1832,4 +1832,4 @@ An <xref:Microsoft.AspNetCore.Hosting.IHostingStartup> implementation allows add
18321832

18331833
* <xref:fundamentals/configuration/options>
18341834

1835-
::: moniker-end
1835+
::: moniker-end

aspnetcore/fundamentals/logging/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ The following code changes the `SourceName` from the default value of `".NET Run
666666

667667
### Azure App Service
668668

669-
The [Microsoft.Extensions.Logging.AzureAppServices](https://www.nuget.org/packages/Microsoft.Extensions.Logging.AzureAppServices) provider package writes logs to text files in an Azure App Service app's file system and to [blob storage](https://azure.microsoft.com/documentation/articles/storage-dotnet-how-to-use-blobs/#what-is-blob-storage) in an Azure Storage account.
669+
The [Microsoft.Extensions.Logging.AzureAppServices](https://www.nuget.org/packages/Microsoft.Extensions.Logging.AzureAppServices) provider package writes logs to text files in an Azure App Service app's file system and to [blob storage](/azure/storage/blobs/storage-quickstart-blobs-dotnet#what-is-blob-storage) in an Azure Storage account.
670670

671671
The provider package isn't included in the shared framework. To use the provider, add the provider package to the project.
672672

@@ -712,7 +712,7 @@ For more information, see the following resources:
712712
* [Application Insights overview](/azure/application-insights/app-insights-overview)
713713
* [Application Insights for ASP.NET Core applications](/azure/azure-monitor/app/asp-net-core) - Start here if you want to implement the full range of Application Insights telemetry along with logging.
714714
* [ApplicationInsightsLoggerProvider for .NET Core ILogger logs](/azure/azure-monitor/app/ilogger) - Start here if you want to implement the logging provider without the rest of Application Insights telemetry.
715-
* [Application Insights logging adapters](https://docs.microsoft.com/azure/azure-monitor/app/asp-net-trace-logs).
715+
* [Application Insights logging adapters](/azure/azure-monitor/app/asp-net-trace-logs).
716716
* [Install, configure, and initialize the Application Insights SDK](/learn/modules/instrument-web-app-code-with-application-insights) - Interactive tutorial on the Microsoft Learn site.
717717

718718
## Third-party logging providers
@@ -1566,7 +1566,7 @@ To use this provider, an app has to run on the .NET Framework (rather than .NET
15661566

15671567
### Azure App Service provider
15681568

1569-
The [Microsoft.Extensions.Logging.AzureAppServices](https://www.nuget.org/packages/Microsoft.Extensions.Logging.AzureAppServices) provider package writes logs to text files in an Azure App Service app's file system and to [blob storage](https://azure.microsoft.com/documentation/articles/storage-dotnet-how-to-use-blobs/#what-is-blob-storage) in an Azure Storage account.
1569+
The [Microsoft.Extensions.Logging.AzureAppServices](https://www.nuget.org/packages/Microsoft.Extensions.Logging.AzureAppServices) provider package writes logs to text files in an Azure App Service app's file system and to [blob storage](/azure/storage/blobs/storage-quickstart-blobs-dotnet#what-is-blob-storage) in an Azure Storage account.
15701570
15711571
```csharp
15721572
logging.AddAzureWebAppDiagnostics();
@@ -1615,7 +1615,7 @@ For more information, see the following resources:
16151615
* [Application Insights overview](/azure/application-insights/app-insights-overview)
16161616
* [Application Insights for ASP.NET Core applications](/azure/azure-monitor/app/asp-net-core) - Start here if you want to implement the full range of Application Insights telemetry along with logging.
16171617
* [ApplicationInsightsLoggerProvider for .NET Core ILogger logs](/azure/azure-monitor/app/ilogger) - Start here if you want to implement the logging provider without the rest of Application Insights telemetry.
1618-
* [Application Insights logging adapters](https://docs.microsoft.com/azure/azure-monitor/app/asp-net-trace-logs).
1618+
* [Application Insights logging adapters](/azure/azure-monitor/app/asp-net-trace-logs).
16191619
* [Install, configure, and initialize the Application Insights SDK](/learn/modules/instrument-web-app-code-with-application-insights) - Interactive tutorial on the Microsoft Learn site.
16201620

16211621
## Third-party logging providers
@@ -1646,4 +1646,4 @@ For more information, see each provider's documentation. Third-party logging pro
16461646

16471647
* <xref:fundamentals/logging/loggermessage>
16481648

1649-
::: moniker-end
1649+
::: moniker-end

aspnetcore/fundamentals/routing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This document covers low-level details of ASP.NET Core routing. For information
3434
The endpoint routing system described in this document applies to ASP.NET Core 3.0 and later. For information on the previous routing system based on <xref:Microsoft.AspNetCore.Routing.IRouter>, select the ASP.NET Core 2.1 version using one of the following approaches:
3535

3636
* The version selector for a previous version.
37-
* Select [ASP.NET Core 2.1 routing](https://docs.microsoft.com/aspnet/core/fundamentals/routing?view=aspnetcore-2.1).
37+
* Select [ASP.NET Core 2.1 routing](?view=aspnetcore-2.1).
3838

3939
[View or download sample code](https://github.com/aspnet/AspNetCore.Docs/tree/master/aspnetcore/fundamentals/routing/samples/3.x) ([how to download](xref:index#how-to-download-a-sample))
4040

@@ -1009,7 +1009,7 @@ services.AddMvc(options => options.EnableEndpointRouting = false)
10091009
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
10101010
```
10111011

1012-
For more information on <xref:Microsoft.AspNetCore.Routing.IRouter>-based routing, see the [ASP.NET Core 2.1 version of this topic](/aspnet/core/fundamentals/routing?view=aspnetcore-2.1).
1012+
For more information on <xref:Microsoft.AspNetCore.Routing.IRouter>-based routing, see the [ASP.NET Core 2.1 version of this topic](?view=aspnetcore-2.1).
10131013

10141014
> [!IMPORTANT]
10151015
> This document covers low-level ASP.NET Core routing. For information on ASP.NET Core MVC routing, see <xref:mvc/controllers/routing>. For information on routing conventions in Razor Pages, see <xref:razor-pages/razor-pages-conventions>.
@@ -1541,8 +1541,8 @@ With the preceding route, the action `SubscriptionManagementController.GetAll` i
15411541

15421542
ASP.NET Core provides API conventions for using a parameter transformers with generated routes:
15431543

1544-
* ASP.NET Core MVC has the `Microsoft.AspNetCore.Mvc.ApplicationModels.RouteTokenTransformerConvention` API convention. This convention applies a specified parameter transformer to all attribute routes in the app. The parameter transformer transforms attribute route tokens as they are replaced. For more information, see [Use a parameter transformer to customize token replacement](/aspnet/core/mvc/controllers/routing#use-a-parameter-transformer-to-customize-token-replacement).
1545-
* Razor Pages has the `Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteTransformerConvention` API convention. This convention applies a specified parameter transformer to all automatically discovered Razor Pages. The parameter transformer transforms the folder and file name segments of Razor Pages routes. For more information, see [Use a parameter transformer to customize page routes](/aspnet/core/razor-pages/razor-pages-conventions#use-a-parameter-transformer-to-customize-page-routes).
1544+
* ASP.NET Core MVC has the `Microsoft.AspNetCore.Mvc.ApplicationModels.RouteTokenTransformerConvention` API convention. This convention applies a specified parameter transformer to all attribute routes in the app. The parameter transformer transforms attribute route tokens as they are replaced. For more information, see [Use a parameter transformer to customize token replacement](xref:mvc/controllers/routing#use-a-parameter-transformer-to-customize-token-replacement).
1545+
* Razor Pages has the `Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteTransformerConvention` API convention. This convention applies a specified parameter transformer to all automatically discovered Razor Pages. The parameter transformer transforms the folder and file name segments of Razor Pages routes. For more information, see [Use a parameter transformer to customize page routes](xref:razor-pages/razor-pages-conventions#use-a-parameter-transformer-to-customize-page-routes).
15461546

15471547
## URL generation reference
15481548

aspnetcore/fundamentals/servers/httpsys.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ In Visual Studio, the default launch profile is for IIS Express. To run the proj
239239

240240
Reference documentation for *netsh.exe*:
241241

242-
* [Netsh Commands for Hypertext Transfer Protocol (HTTP)](https://technet.microsoft.com/library/cc725882.aspx)
242+
* [Netsh Commands for Hypertext Transfer Protocol (HTTP)](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725882(v=ws.10))
243243
* [UrlPrefix Strings](/windows/win32/http/urlprefix-strings)
244244

245245
1. Run the app.
@@ -490,7 +490,7 @@ In Visual Studio, the default launch profile is for IIS Express. To run the proj
490490

491491
Reference documentation for *netsh.exe*:
492492

493-
* [Netsh Commands for Hypertext Transfer Protocol (HTTP)](https://technet.microsoft.com/library/cc725882.aspx)
493+
* [Netsh Commands for Hypertext Transfer Protocol (HTTP)](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725882(v=ws.10))
494494
* [UrlPrefix Strings](/windows/win32/http/urlprefix-strings)
495495

496496
1. Run the app.
@@ -743,7 +743,7 @@ In Visual Studio, the default launch profile is for IIS Express. To run the proj
743743

744744
Reference documentation for *netsh.exe*:
745745

746-
* [Netsh Commands for Hypertext Transfer Protocol (HTTP)](https://technet.microsoft.com/library/cc725882.aspx)
746+
* [Netsh Commands for Hypertext Transfer Protocol (HTTP)](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725882(v=ws.10))
747747
* [UrlPrefix Strings](/windows/win32/http/urlprefix-strings)
748748

749749
1. Run the app.
@@ -996,7 +996,7 @@ In Visual Studio, the default launch profile is for IIS Express. To run the proj
996996

997997
Reference documentation for *netsh.exe*:
998998

999-
* [Netsh Commands for Hypertext Transfer Protocol (HTTP)](https://technet.microsoft.com/library/cc725882.aspx)
999+
* [Netsh Commands for Hypertext Transfer Protocol (HTTP)](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725882(v=ws.10))
10001000
* [UrlPrefix Strings](/windows/win32/http/urlprefix-strings)
10011001

10021002
1. Run the app.
@@ -1021,4 +1021,4 @@ For apps hosted by HTTP.sys that interact with requests from the Internet or a c
10211021
* [The host](xref:fundamentals/index#host)
10221022
* <xref:test/troubleshoot>
10231023

1024-
::: moniker-end
1024+
::: moniker-end

aspnetcore/grpc/diagnostics.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ By [James Newton-King](https://twitter.com/jamesnk)
1515
This article provides guidance for gathering diagnostics from a gRPC app to help troubleshoot issues. Topics covered include:
1616

1717
* **Logging** - Structured logs written to [.NET Core logging](xref:fundamentals/logging/index). <xref:Microsoft.Extensions.Logging.ILogger> is used by app frameworks to write logs, and by users for their own logging in an app.
18-
* **Tracing** - Events related to an operation written using `DiaganosticSource` and `Activity`. Traces from diagnostic source are commonly used to collect app telemetry by libraries such as [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/asp-net-core) and [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet).
19-
* **Metrics** - Representation of data measures over intervals of time, for example, requests per second. Metrics are emitted using `EventCounter` and can be observed using [dotnet-counters](https://docs.microsoft.com/dotnet/core/diagnostics/dotnet-counters) command line tool or with [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/eventcounters).
18+
* **Tracing** - Events related to an operation written using `DiaganosticSource` and `Activity`. Traces from diagnostic source are commonly used to collect app telemetry by libraries such as [Application Insights](/azure/azure-monitor/app/asp-net-core) and [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet).
19+
* **Metrics** - Representation of data measures over intervals of time, for example, requests per second. Metrics are emitted using `EventCounter` and can be observed using [dotnet-counters](/dotnet/core/diagnostics/dotnet-counters) command line tool or with [Application Insights](/azure/azure-monitor/app/eventcounters).
2020

2121
## Logging
2222

@@ -95,7 +95,7 @@ If your app isn't using DI then you can create a new `ILoggerFactory` instance w
9595

9696
#### gRPC client log scopes
9797

98-
The gRPC client adds a [logging scope](https://docs.microsoft.com/aspnet/core/fundamentals/logging#log-scopes) to logs made during a gRPC call. The scope has metadata related to the gRPC call:
98+
The gRPC client adds a [logging scope](../fundamentals/logging/index.md#log-scopes) to logs made during a gRPC call. The scope has metadata related to the gRPC call:
9999

100100
* **GrpcMethodType** - The gRPC method type. Possible values are names from `Grpc.Core.MethodType` enum, e.g. Unary
101101
* **GrpcUri** - The relative URI of the gRPC method, e.g. /greet.Greeter/SayHellos
@@ -117,7 +117,7 @@ dbug: Grpc.Net.Client.Internal.GrpcCall[4]
117117

118118
## Tracing
119119

120-
gRPC services and the gRPC client provide information about gRPC calls using [DiagnosticSource](https://docs.microsoft.com/dotnet/api/system.diagnostics.diagnosticsource) and [Activity](https://docs.microsoft.com/dotnet/api/system.diagnostics.activity).
120+
gRPC services and the gRPC client provide information about gRPC calls using [DiagnosticSource](/dotnet/api/system.diagnostics.diagnosticsource) and [Activity](/dotnet/api/system.diagnostics.activity).
121121

122122
* .NET gRPC uses an activity to represent a gRPC call.
123123
* Tracing events are written to the diagnostic source at the start and stop of the gRPC call activity.
@@ -143,7 +143,7 @@ The .NET gRPC client uses `HttpClient` to make gRPC calls. Although `HttpClient`
143143

144144
### Collecting tracing
145145

146-
The easiest way to use `DiagnosticSource` is to configure a telemetry library such as [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/asp-net-core) or [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet) in your app. The library will process information about gRPC calls along-side other app telemetry.
146+
The easiest way to use `DiagnosticSource` is to configure a telemetry library such as [Application Insights](/azure/azure-monitor/app/asp-net-core) or [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet) in your app. The library will process information about gRPC calls along-side other app telemetry.
147147

148148
Tracing can be viewed in a managed service like Application Insights, or you can choose to run your own distributed tracing system. OpenTelemetry supports exporting tracing data to [Jaeger](https://www.jaegertracing.io/) and [Zipkin](https://zipkin.io/).
149149

@@ -187,7 +187,7 @@ gRPC client metrics are reported on `Grpc.Net.Client` event source.
187187

188188
### Observe metrics
189189

190-
[dotnet-counters](https://docs.microsoft.com/dotnet/core/diagnostics/dotnet-counters) is a performance monitoring tool for ad-hoc health monitoring and first-level performance investigation. Monitor a .NET app with either `Grpc.AspNetCore.Server` or `Grpc.Net.Client` as the provider name.
190+
[dotnet-counters](/dotnet/core/diagnostics/dotnet-counters) is a performance monitoring tool for ad-hoc health monitoring and first-level performance investigation. Monitor a .NET app with either `Grpc.AspNetCore.Server` or `Grpc.Net.Client` as the provider name.
191191

192192
```console
193193
> dotnet-counters monitor --process-id 1902 Grpc.AspNetCore.Server
@@ -204,7 +204,7 @@ Press p to pause, r to resume, q to quit.
204204
Total Calls Unimplemented 0
205205
```
206206

207-
Another way to observe gRPC metrics is to capture counter data using Application Insights's [Microsoft.ApplicationInsights.EventCounterCollector package](https://docs.microsoft.com/azure/azure-monitor/app/eventcounters). Once setup, Application Insights collects common .NET counters at runtime. gRPC's counters are not collected by default, but App Insights can be [customized to include additional counters](https://docs.microsoft.com/azure/azure-monitor/app/eventcounters#customizing-counters-to-be-collected).
207+
Another way to observe gRPC metrics is to capture counter data using Application Insights's [Microsoft.ApplicationInsights.EventCounterCollector package](/azure/azure-monitor/app/eventcounters). Once setup, Application Insights collects common .NET counters at runtime. gRPC's counters are not collected by default, but App Insights can be [customized to include additional counters](/azure/azure-monitor/app/eventcounters#customizing-counters-to-be-collected).
208208

209209
Specify the gRPC counters for Application Insight to collect in *Startup.cs*:
210210

@@ -231,4 +231,4 @@ Specify the gRPC counters for Application Insight to collect in *Startup.cs*:
231231

232232
* <xref:fundamentals/logging/index>
233233
* <xref:grpc/configuration>
234-
* <xref:grpc/clientfactory>
234+
* <xref:grpc/clientfactory>

0 commit comments

Comments
 (0)