Skip to content

Commit 6ce720a

Browse files
Copilotwadepickett
andcommitted
Add Identity metrics documentation for .NET 10
Co-authored-by: wadepickett <[email protected]>
1 parent 6d90cbe commit 6ce720a

File tree

2 files changed

+57
-4
lines changed

2 files changed

+57
-4
lines changed

aspnetcore/log-mon/metrics/metrics.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
title: ASP.NET Core metrics
3-
description: Metrics for ASP.NET Core apps
3+
ai-usage: ai-assisted
44
author: tdykstra
5-
ms.author: tdykstra
5+
description: Metrics for ASP.NET Core apps
66
monikerRange: '>= aspnetcore-8.0'
7-
ms.date: 10/18/2023
7+
ms.author: tdykstra
8+
ms.date: 11/10/2025
89
ms.topic: article
910
uid: log-mon/metrics/metrics
1011
---
@@ -262,6 +263,47 @@ The proceeding test:
262263
* Makes an HTTP request to the web app.
263264
* Asserts the test using results from the metrics collector.
264265

266+
:::moniker range=">= aspnetcore-10.0"
267+
268+
## ASP.NET Core Identity metrics
269+
270+
ASP.NET Core Identity observability has been improved in .NET 10 with metrics. These metrics help you monitor user management activities and authentication processes.
271+
272+
The metrics are in the `Microsoft.AspNetCore.Identity` meter and include:
273+
274+
### User management metrics
275+
276+
* `aspnetcore.identity.user.create.duration` - Measures the duration of user creation operations
277+
* `aspnetcore.identity.user.update.duration` - Measures the duration of user update operations
278+
* `aspnetcore.identity.user.delete.duration` - Measures the duration of user deletion operations
279+
* `aspnetcore.identity.user.check_password_attempts` - Counts password verification attempts
280+
* `aspnetcore.identity.user.generated_tokens` - Counts tokens generated for users (like password reset tokens)
281+
* `aspnetcore.identity.user.verify_token_attempts` - Counts token verification attempts
282+
283+
### Authentication metrics
284+
285+
* `aspnetcore.identity.sign_in.authenticate.duration` - Measures the duration of authentication operations
286+
* `aspnetcore.identity.sign_in.check_password_attempts` - Counts password check attempts during sign-in
287+
* `aspnetcore.identity.sign_in.sign_ins` - Counts successful sign-ins
288+
* `aspnetcore.identity.sign_in.sign_outs` - Counts sign-outs
289+
* `aspnetcore.identity.sign_in.two_factor_clients_remembered` - Counts remembered two-factor clients
290+
* `aspnetcore.identity.sign_in.two_factor_clients_forgotten` - Counts forgotten two-factor clients
291+
292+
These metrics can be used to:
293+
294+
* Monitor user registration and management
295+
* Track authentication patterns and potential security issues
296+
* Measure performance of Identity operations
297+
* Observe two-factor authentication usage
298+
299+
You can view these metrics using the techniques described earlier in this article, such as `dotnet-counters` or Prometheus with Grafana.
300+
301+
```dotnetcli
302+
dotnet-counters monitor -n YourAppName --counters Microsoft.AspNetCore.Identity
303+
```
304+
305+
:::moniker-end
306+
265307
## ASP.NET Core meters and counters
266308

267309
See [ASP.NET Core metrics](/dotnet/core/diagnostics/built-in-metrics-aspnetcore) for a list of ASP.NET Core meters and counters.

aspnetcore/security/authentication/identity.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
title: Introduction to Identity on ASP.NET Core
3+
ai-usage: ai-assisted
34
author: wadepickett
45
description: Use Identity with an ASP.NET Core app. Learn how to set password requirements (RequireDigit, RequiredLength, RequiredUniqueChars, and more).
56
monikerRange: '>= aspnetcore-3.0'
67
ms.author: wpickett
7-
ms.date: 10/30/2025
8+
ms.date: 11/10/2025
89
uid: security/authentication/identity
910
---
1011
# Introduction to Identity on ASP.NET Core
@@ -202,6 +203,16 @@ The template-generated app doesn't use [authorization](xref:security/authorizati
202203

203204
For more information on `IdentityOptions`, see <xref:Microsoft.AspNetCore.Identity.IdentityOptions> and [Application Startup](xref:fundamentals/startup).
204205

206+
:::moniker range=">= aspnetcore-10.0"
207+
208+
## ASP.NET Core Identity metrics
209+
210+
ASP.NET Core Identity metrics provide monitoring capabilities for user management and authentication processes. These metrics help you detect unusual sign-in patterns that might indicate security threats, track the performance of identity operations, and understand how users interact with authentication features such as two-factor authentication. This observability is particularly valuable for applications with strict security requirements or those experiencing high authentication traffic. The ASP.NET Core Identity metrics were introduced in .NET 10.
211+
212+
For complete details on available metrics and how to use them, see <xref:log-mon/metrics/metrics#aspnet-core-identity-metrics>.
213+
214+
:::moniker-end
215+
205216
<!-- Start here for .NET 6 -->
206217

207218
## Scaffold Register, Login, LogOut, and RegisterConfirmation

0 commit comments

Comments
 (0)