Skip to content

Add authentication failure reason to AuthN metrics #60467

Open
@MackinnonBuck

Description

@MackinnonBuck

When authentication fails, the aspnetcore.authentication.request.duration histogram only includes the type of the exception that resulted in the failure. This doesn't provide very useful information about why authentication failed.

We should consider updating the error.type tag or adding a new tag (maybe aspnetcore.authentication.failure_reason) to specify a well-known reason why the authentication handler failed to authenticate. This tag would only apply to the aspnetcore.authentication.request.duration histogram.

See also: #59557 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-authIncludes: Authn, Authz, OAuth, OIDC, Bearer

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions