From b373988dee16bac2f311a6737cc5b4bcc645249b Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 12 Oct 2023 09:41:41 -0400 Subject: [PATCH] Cross-link updates (#30668) --- aspnetcore/log-mon/metrics/metrics.md | 4 ++-- aspnetcore/release-notes/aspnetcore-8.0.md | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aspnetcore/log-mon/metrics/metrics.md b/aspnetcore/log-mon/metrics/metrics.md index 2a74c82599..10f78306c4 100644 --- a/aspnetcore/log-mon/metrics/metrics.md +++ b/aspnetcore/log-mon/metrics/metrics.md @@ -226,14 +226,14 @@ Alternatively, enter counter category such as `kestrel` in the **Expression** in ## Test metrics in ASP.NET Core apps -It's possible to test metrics in ASP.NET Core apps. One way to do that is collect and assert metrics values in [ASP.NET Core integration tests](xref:test/integration-tests) using [MetricCollector](https://learn.microsoft.com/dotnet/api/microsoft.extensions.telemetry.testing.metering.metriccollector-1?view=dotnet-plat-ext-8.0). +It's possible to test metrics in ASP.NET Core apps. One way to do that is collect and assert metrics values in [ASP.NET Core integration tests](xref:test/integration-tests) using `Microsoft.Extensions.Telemetry.Testing.Metering.MetricCollector`. :::code language="csharp" source="~/log-mon/metrics/metrics/samples/metric-tests/BasicTests.cs" id="snippet_TestClass"::: The proceeding test: * Bootstraps a web app in memory with . `Program` in the factory's generic argument specifies the web app. -* Collects metrics values with [MetricCollector](https://learn.microsoft.com/dotnet/api/microsoft.extensions.telemetry.testing.metering.metriccollector-1?view=dotnet-plat-ext-8.0). +* Collects metrics values with `Microsoft.Extensions.Telemetry.Testing.Metering.MetricCollector`. * Requires a package reference to `Microsoft.Extensions.Telemetry.Testing`. * The `MetricCollector` is created using the web app's . This allows the collector to only report metrics values recorded by test. diff --git a/aspnetcore/release-notes/aspnetcore-8.0.md b/aspnetcore/release-notes/aspnetcore-8.0.md index 8de1edc693..88716af646 100644 --- a/aspnetcore/release-notes/aspnetcore-8.0.md +++ b/aspnetcore/release-notes/aspnetcore-8.0.md @@ -22,8 +22,8 @@ This article is under development and not complete. More information may be foun * [What's new in .NET 8 Preview 6](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-6/) * [What's new in .NET 8 Preview 7](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-7/) * [What's new in .NET 8 Release Candidate 1](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-rc-1/) - @@ -110,6 +110,8 @@ public HttpContext? HttpContext { get; set; } Accessing the from a static server component may be useful for inspecting and modifying headers or other properties. +For an example that passes state, access and refresh tokens, to components, see . + ### Render Razor components outside of ASP.NET Core You can now render Razor components outside the context of an HTTP request. You can render Razor components as HTML directly to a string or stream independently of the ASP.NET Core hosting environment. This is convenient for scenarios where you want to generate HTML fragments, such as for a generating email or static site content.