-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Add Identity metrics documentation for .NET 10 #36324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: wadepickett <[email protected]>
Fixed for moniker range.
Added to View Identity metric section
wadepickett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with fixes I added.
guardrex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with recommendations.
|
|
||
| These metrics can be used to: | ||
|
|
||
| * Monitor user registration and management |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these list items need periods. I make the suggestion below 👇.
Suggested udpated from guardrex Co-authored-by: Luke Latham <[email protected]>
Fixed comma
Corrected punctuation and formatting for consistency in metrics documentation.
Fixes #36075
Adds documentation for the 12 new ASP.NET Core Identity metrics introduced in .NET 10 (
Microsoft.AspNetCore.Identitymeter).Changes
aspnetcore/log-mon/metrics/metrics.md: Added comprehensive Identity metrics section with user management (6 metrics) and authentication (6 metrics) categories, usage guidance, and
dotnet-countersexample. Scoped to>= aspnetcore-10.0.aspnetcore/security/authentication/identity.md: Added brief cross-reference section after "Configure Identity services" with xref link to detailed metrics documentation. Scoped to
>= aspnetcore-10.0.Metadata: Updated
ms.dateto 11/10/2025 and addedai-usage: ai-assistedto both files.Metrics Documented
User management:
user.create.duration,user.update.duration,user.delete.duration,user.check_password_attempts,user.generated_tokens,user.verify_token_attemptsAuthentication:
sign_in.authenticate.duration,sign_in.check_password_attempts,sign_in.sign_ins,sign_in.sign_outs,sign_in.two_factor_clients_remembered,sign_in.two_factor_clients_forgottenOriginal prompt
This section details on the original issue you should resolve
<issue_title>.NET 10 RC1: Add Identity metrics to doc set</issue_title>
<issue_description>### Description
Contributes to #35994
See details here:
#35994 (comment)
This information should primarily go into the aspnetcore/log-mon/metrics/metrics.mdfile, with a reference added to the aspnetcore/security/authentication/identity.md file.
This new information needs to be in moniker range for >=10.0 so it does not show up in previous versions of the content.
Reasoning:
The metrics.md file is specifically focused on ASP.NET Core metrics and already contains sections about built-in metrics and how to use them. The identity.md file is focused on introducing Identity functionality, not its implementation details like metrics.
Steps:
For aspnetcore/log-mon/metrics/metrics.md:
The ASP.NET Core Identity metrics information should be added at the end of the document, before the closing code fence. This is the more detailed version, as metrics.md is the primary place for metrics documentation:
ASP.NET Core Identity metrics
ASP.NET Core Identity observability has been improved in .NET 10 with metrics. These metrics help you monitor user management activities and authentication processes.
The metrics are in the
Microsoft.AspNetCore.Identitymeter and include:User management metrics
aspnetcore.identity.user.create.duration- Measures the duration of user creation operationsaspnetcore.identity.user.update.duration- Measures the duration of user update operationsaspnetcore.identity.user.delete.duration- Measures the duration of user deletion operationsaspnetcore.identity.user.check_password_attempts- Counts password verification attemptsaspnetcore.identity.user.generated_tokens- Counts tokens generated for users (like password reset tokens)aspnetcore.identity.user.verify_token_attempts- Counts token verification attemptsAuthentication metrics
aspnetcore.identity.sign_in.authenticate.duration- Measures the duration of authentication operationsaspnetcore.identity.sign_in.check_password_attempts- Counts password check attempts during sign-inaspnetcore.identity.sign_in.sign_ins- Counts successful sign-insaspnetcore.identity.sign_in.sign_outs- Counts sign-outsaspnetcore.identity.sign_in.two_factor_clients_remembered- Counts remembered two-factor clientsaspnetcore.identity.sign_in.two_factor_clients_forgotten- Counts forgotten two-factor clientsThese metrics can be used to:
You can view these metrics using the techniques described earlier in this article, such as
dotnet-countersor Prometheus with Grafana.For aspnetcore/security/authentication/identity.md
Insert a brief mention after the "Configure Identity services" section, where it talks about services and infrastructure:
ASP.NET Core Identity metrics
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.
For complete details on available metrics and how to use them, see xref:log-mon/metrics/metrics#asp.net-core-identity-metrics.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/log-mon/metrics/metrics?view=aspnetcore-10.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/log-mon/metrics/metrics.md
Document ID
fc4aa26a-a037-2bd9-f313-e3073d6b8232
Platform Id
b249ca56-4df1-23dc-97f7-ce3d64597006
Article author
@tdykstra
Metadata
Related Issues
Associated WorkItem - 488324</issue_description>
<agent_instructions>Also follow additonal analysis and instructions provided in the issue discussion.</agent_instructions>
Comments on the Issue (you are @copilot in this section)
@wadepickettAI analysis test ru...
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Internal previews