# Aspnetcore
## ASP.NET Core Attributes
ASP.NET Core attributes
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `aspnetcore.authentication_scheme` | string | The authentication scheme to sign in with. | `Identity.Application` |  |
| `aspnetcore.diagnostics.exception.result` | string | ASP.NET Core exception middleware handling result. | `handled`; `unhandled` |  |
| `aspnetcore.diagnostics.handler.type` | string | Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception. | `Contoso.MyHandler` |  |
| `aspnetcore.identity.error_code` | string | The error code for a failed identity operation. | `DefaultError`; `PasswordMismatch` |  |
| `aspnetcore.identity.password_check_result` | string | The result from checking the password. | `success`; `failure` |  |
| `aspnetcore.identity.result` | string | The result of the identity operation. | `success`; `failure` |  |
| `aspnetcore.identity.sign_in.result` | string | Whether the sign in result was success or failure. | `password`; `two_factor` |  |
| `aspnetcore.identity.sign_in.type` | string | The authentication type. | `password`; `two_factor` |  |
| `aspnetcore.identity.token_purpose` | string | What the token will be used for. | `success`; `failure` |  |
| `aspnetcore.identity.token_verified` | string | The result of token verification. | `success`; `failure` |  |
| `aspnetcore.identity.user.update_type` | string | The user update type. | `update`; `user_name`; `reset_password` |  |
| `aspnetcore.identity.user_type` | string | The full name of the identity user type. | `Contoso.ContosoUser` |  |
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` |  |
| `aspnetcore.rate_limiting.result` | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` |  |
| `aspnetcore.request.is_unhandled` | boolean | Flag indicating if request was handled by the application pipeline. | `true` |  |
| `aspnetcore.routing.is_fallback` | boolean | A value that indicates whether the matched route is a fallback route. | `true` |  |
| `aspnetcore.routing.match_status` | string | Match result - success or failure | `success`; `failure` |  |
| `aspnetcore.sign_in.is_persistent` | boolean | A flag indicating whether the sign in is persistent. | |  |
---
`aspnetcore.diagnostics.exception.result` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `aborted` | Exception handling didn't run because the request was aborted. |  |
| `handled` | Exception was handled by the exception handling middleware. |  |
| `skipped` | Exception handling was skipped because the response had started. |  |
| `unhandled` | Exception was not handled by the exception handling middleware. |  |
---
`aspnetcore.identity.password_check_result` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `failure` | Password check failed. |  |
| `password_missing` | Password check couldn't proceed because the password was missing from the user. |  |
| `success` | Password check was successful. |  |
| `success_rehash_needed` | Password check was successful however the password was encoded using a deprecated algorithm and should be rehashed and updated. |  |
| `user_missing` | Password check couldn't proceed because the user was missing. |  |
---
`aspnetcore.identity.result` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `failure` | Identity operation failed. |  |
| `success` | Identity operation was successful. |  |
---
`aspnetcore.identity.sign_in.result` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `failure` | Sign in failed. |  |
| `locked_out` | User is locked out. |  |
| `not_allowed` | User is not allowed to sign in. |  |
| `requires_two_factor` | User requires two factory authentication to sign in. |  |
| `success` | Sign in was successful. |  |
---
`aspnetcore.identity.sign_in.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `external` | Sign in with a previously registered third-party login. |  |
| `passkey` | Sign in with passkey. |  |
| `password` | Sign in with password. |  |
| `two_factor` | Sign in with a two factor provider. |  |
| `two_factor_authenticator` | Sign in with two factor authenticator app. |  |
| `two_factor_recovery_code` | Sign in with two factory recovery code. |  |
---
`aspnetcore.identity.token_purpose` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `_OTHER` | Any token purpose that the instrumentation has no prior knowledge of. |  |
| `change_email` | The token is for changing the user email address. |  |
| `change_phone_number` | The token is for changing a user phone number. |  |
| `email_confirmation` | The token is for confirming user email address. |  |
| `reset_password` | The token is for resetting a user password. |  |
| `two_factor` | The token is for changing user two factor settings. |  |
---
`aspnetcore.identity.token_verified` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `failure` | Token verification failed. |  |
| `success` | Token verification was successful. |  |
---
`aspnetcore.identity.user.update_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `_OTHER` | Any update type that the instrumentation has no prior knowledge of. |  |
| `access_failed` | Identity user access failure recorded. |  |
| `add_claims` | Identity user claims added. |  |
| `add_login` | Identity user login added. |  |
| `add_password` | Identity user password added. |  |
| `add_to_roles` | Identity user added to roles. |  |
| `change_email` | Identity user email changed. |  |
| `change_password` | Identity user password changed. |  |
| `change_phone_number` | Identity user phone number changed. |  |
| `confirm_email` | Identity user email confirmed. |  |
| `generate_new_two_factor_recovery_codes` | Identity user new two-factor recovery codes generated. |  |
| `password_rehash` | Identity user password rehashed. |  |
| `redeem_two_factor_recovery_code` | Identity user two-factor recovery code redeemed. |  |
| `remove_authentication_token` | Identity user authentication token removed. |  |
| `remove_claims` | Identity user claims removed. |  |
| `remove_from_roles` | Identity user removed from roles. |  |
| `remove_login` | Identity user login removed. |  |
| `remove_passkey` | Identity user passkey removed. |  |
| `remove_password` | Identity user password removed. |  |
| `replace_claim` | Identity user claim replaced. |  |
| `reset_access_failed_count` | Identity user access failure count reset. |  |
| `reset_authenticator_key` | Identity user authenticator key reset. |  |
| `reset_password` | Identity user password reset. |  |
| `security_stamp` | Identity user security stamp updated. |  |
| `set_authentication_token` | Identity user authentication token set. |  |
| `set_email` | Identity user email set. |  |
| `set_lockout_enabled` | Identity user lockout enabled or disabled. |  |
| `set_lockout_end_date` | Identity user lockout end date set. |  |
| `set_passkey` | Identity user passkey set. |  |
| `set_phone_number` | Identity user phone number set. |  |
| `set_two_factor_enabled` | Identity user two-factor authentication enabled or disabled. |  |
| `update` | Identity user updated. |  |
| `user_name` | Identity user name updated. |  |
---
`aspnetcore.rate_limiting.result` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `acquired` | Lease was acquired |  |
| `endpoint_limiter` | Lease request was rejected by the endpoint limiter |  |
| `global_limiter` | Lease request was rejected by the global limiter |  |
| `request_canceled` | Lease request was canceled |  |
---
`aspnetcore.routing.match_status` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `failure` | Match failed |  |
| `success` | Match succeeded |  |