Skip to content

ASP.NET Core identity sign in metrics APIΒ #62131

@JamesNK

Description

@JamesNK

Background and Motivation

API review of sign in manager metrics for #62078.

Proposed API

Microsoft.AspNetCore.Identity

aspnetcore.identity.sign_in.authenticate

Name Instrument Type Unit Description
aspnetcore.identity.sign_in.authenticate Counter count The number of authenticate attempts. The authenticate counter is incremented by sign in methods such as PasswordSignInAsync and TwoFactorSignInAsync.
Attribute Type Description Examples Presence
aspnetcore.identity.user_type string The identity user type. ContosoUser Always
aspnetcore.identity.authentication_scheme string The authentication scheme to sign in with. Identity.Application Always
aspnetcore.identity.sign_in.type string The authentication type. password; two_factor Always
aspnetcore.identity.sign_in.is_persistent boolean A flag indicating whether the sign in is persistant. true If no exception was thrown.
aspnetcore.identity.sign_in.result string Whether the sign in result was success or failure. success; failure If no exception was thrown.
error.type string The full name of exception type. System.InvalidOperationException If an exception was thrown.

aspnetcore.identity.sign_in.remember_two_factor

Name Instrument Type Unit Description
aspnetcore.identity.sign_in.remember_two_factor Counter count The number of two factor clients remembered.
Attribute Type Description Examples Presence
aspnetcore.identity.user_type string The identity user type. ContosoUser Always
aspnetcore.identity.authentication_scheme string The authentication scheme to sign in with. Identity.Application Always
error.type string The full name of exception type. System.InvalidOperationException If an exception was thrown.

aspnetcore.identity.sign_in.forget_two_factor

Name Instrument Type Unit Description
aspnetcore.identity.sign_in.forget_two_factor Counter count The number of two factor clients forgotten.
Attribute Type Description Examples Presence
aspnetcore.identity.user_type string The identity user type. ContosoUser Always
aspnetcore.identity.authentication_scheme string The authentication scheme to sign in with. Identity.Application Always
error.type string The full name of exception type. System.InvalidOperationException If an exception was thrown.

aspnetcore.identity.sign_in.check_password

Name Instrument Type Unit Description
aspnetcore.identity.sign_in.check_password Counter count The number of check password attempts. Checks that the account is in a state that can log in and that the password is valid using the UserManager.CheckPasswordAsync method.
Attribute Type Description Examples Presence
aspnetcore.identity.user_type string The identity user type. ContosoUser Always
aspnetcore.identity.sign_in.result string Whether the sign in result was success or failure. success; failure If no exception was thrown.
error.type string The full name of exception type. System.InvalidOperationException If an exception was thrown.

aspnetcore.identity.sign_in.sign_in_principal

Name Instrument Type Unit Description
aspnetcore.identity.sign_in.sign_in_principal Counter count The number of calls to sign in user principals.
Attribute Type Description Examples Presence
aspnetcore.identity.user_type string The identity user type. ContosoUser Always
aspnetcore.identity.authentication_scheme string The authentication scheme to sign in with. Identity.Application Always
aspnetcore.identity.sign_in.is_persistent boolean A flag indicating whether the sign in is persistant. true If no exception was thrown.
error.type string The full name of exception type. System.InvalidOperationException If an exception was thrown.

aspnetcore.identity.sign_in.sign_out_principal

Name Instrument Type Unit Description
aspnetcore.identity.sign_in.sign_out_principal Counter count The number of calls to sign out user principals.
Attribute Type Description Examples Presence
aspnetcore.identity.user_type string The identity user type. ContosoUser Always
aspnetcore.identity.authentication_scheme string The authentication scheme to sign in with. Identity.Application Always
error.type string The full name of exception type. System.InvalidOperationException If an exception was thrown.

Usage Examples

Alternative Designs

Risks

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-approvedAPI was approved in API review, it can be implementedarea-identityIncludes: Identity and providers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions