Skip to content

Commit 8a967aa

Browse files
committed
.NET 9 or later
1 parent 178e8b0 commit 8a967aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

aspnetcore/log-mon/metrics/metrics.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ The proceeding example:
109109
> [!NOTE]
110110
> Follow the [multi-dimensional metrics](/dotnet/core/diagnostics/metrics-instrumentation#multi-dimensional-metrics) best practices when enriching with custom tags. Too many tags, or tags with an unbound range cause a large combination of tags, which creates many dimensions. Collection tools have a limit on how many dimensions they support for a counter and may start filtering results out to avoid excessive memory usage.
111111
112+
:::moniker range=">= aspnetcore-9.0"
113+
112114
## Opt-out of HTTP metrics on certain endpoints and requests
113115

114116
Opting out of recording metrics is beneficial for endpoints frequently called by automated systems, such as health checks. Recording metrics for these requests is generally unnecessary. Unwanted telemetry costs resources to collect and store, and can distort results displayed in a telemetry dashboard.
@@ -127,6 +129,8 @@ Alternatively, the <xref:Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeat
127129

128130
:::code language="csharp" source="~/log-mon/metrics/samples/DisableMetrics/Program.cs" id="snippet_2":::
129131

132+
:::moniker-end
133+
130134
## Create custom metrics
131135

132136
Metrics are created using APIs in the <xref:System.Diagnostics.Metrics> namespace. See [Create custom metrics](/dotnet/core/diagnostics/metrics-instrumentation#create-a-custom-metric) for information on creating custom metrics.

0 commit comments

Comments
 (0)