Skip to content

Commit 6971213

Browse files
committed
.NET 10 metrics /1
1 parent a055d97 commit 6971213

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

aspnetcore/log-mon/metrics/built-in/includes/built-in10.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,4 +400,98 @@ As this metric is tracking the connection duration, and ideally SignalR connecti
400400
| `signalr.transport` | string | [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) | `web_sockets`; `long_polling` | Always |
401401

402402
.
403+
404+
## `Microsoft.AspNetCore.Authorization`
405+
406+
The `Microsoft.AspNetCore.Authorization` metrics report information about [Authorization attempts](xref:security/authorization/introduction) in ASP.NET Core apps:
407+
408+
<!--- section links here -->
409+
##### Metric: `aspnetcore.authorization.attempts`
410+
411+
| Name | Instrument Type | Unit (UCUM) | Description |
412+
| -------- | --------------- | ----------- | -------------- |
413+
| `aspnetcore.authorization.attempts` <!--(https://opentelemetry.io/docs/specs/semconv/dotnet/dotnet-aspnetcore-metrics/)--> | Counter | `{request}` | The total number of requests for which authorization was attempted. |
414+
415+
| Attribute | Type | Description | Examples | Presence |
416+
|---|---|---|---|---|
417+
| `user.is_authenticated` | Boolean | Match result | `success`; `failure` | Always |
418+
| `aspnetcore.authorization.policy` | string | The authorization policy. | `Basic` | Always |
419+
| `error.type` | string | The error message. | `An error occurred in the authorization handler` | Always |
420+
421+
.
422+
423+
## `Microsoft.AspNetCore.Authentication`
424+
425+
The `Microsoft.AspNetCore.Authentication` metrics report information about [Authentication](xref:security/authentication/index) in ASP.NET Core apps:
426+
427+
* [`aspnetcore.authentication.authenticate.duration`](#aspnetcore-authentication-authenticate-duration)
428+
* [`aspnetcore.authentication.challenges`](#aspnetcore-authentication-challenges)
429+
* [`aspnetcore.authentication.forbids`](#aspnetcore-authentication-forbids)
430+
* [`aspnetcore.authentication.sign_ins`](#aspnetcore-authentication-sign-ins)
431+
432+
<!--- section links here -->
433+
##### Metric: `aspnetcore.authentication.authenticate.duration`
434+
435+
| Name | Instrument Type | Unit (UCUM) | Description |
436+
| -------- | --------------- | ----------- | -------------- |
437+
| `aspnetcore.authentication.authenticate.duration` <!--(https://opentelemetry.io/docs/specs/semconv/dotnet/dotnet-aspnetcore-metrics/)--> | Histogram | `s` | The authentication duration for a request. |
438+
439+
| Attribute | Type | Description | Examples | Presence |
440+
|---|---|---|---|---|
441+
| `aspnetcore.authentication.result` | string | The authentication result. | `success` | Always |
442+
| `aspnetcore.authentication.scheme` | string | The authentication scheme. | `custom` | Always |
443+
| `error.type` | string | The error message. | `An error occurred in the authorization handler` | If an authentication error or exception occured. |
444+
445+
.
446+
447+
##### Metric: `aspnetcore.authentication.challenges`
448+
449+
| Name | Instrument Type | Unit (UCUM) | Description |
450+
| -------- | --------------- | ----------- | -------------- |
451+
| `aspnetcore.authentication.challenges` <!--(https://opentelemetry.io/docs/specs/semconv/dotnet/dotnet-aspnetcore-metrics/)--> | Counter | `{request}` | The total number of times a scheme is challenged. |
452+
453+
| Attribute | Type | Description | Examples | Presence |
454+
|---|---|---|---|---|
455+
| `aspnetcore.authentication.scheme` | string | The authentication scheme. | `custom` | Always |
456+
| `error.type` | string | The error message. | `An error occurred in the authorization handler` | If an authentication error or exception occured. |
457+
458+
.
459+
460+
##### Metric: `aspnetcore.authentication.forbids`
461+
462+
| Name | Instrument Type | Unit (UCUM) | Description |
463+
| -------- | --------------- | ----------- | -------------- |
464+
| `aspnetcore.authentication.forbids` <!--(https://opentelemetry.io/docs/specs/semconv/dotnet/dotnet-aspnetcore-metrics/)--> | Counter | `{request}` | The total number of times an authenticated user attempts to access a resource they are not permitted to access. |
465+
466+
| Attribute | Type | Description | Examples | Presence |
467+
|---|---|---|---|---|
468+
| `aspnetcore.authentication.scheme` | string | The authentication scheme. | `custom` | Always |
469+
| `error.type` | string | The error message. | `An error occurred during sign out.` | If an authentication error or exception occured. |
470+
471+
.
472+
473+
##### Metric: `aspnetcore.authentication.sign_ins`
474+
475+
| Name | Instrument Type | Unit (UCUM) | Description |
476+
| -------- | --------------- | ----------- | -------------- |
477+
| `aspnetcore.authentication.sign_ins` <!--(https://opentelemetry.io/docs/specs/semconv/dotnet/dotnet-aspnetcore-metrics/)--> | Counter | `{request}` | The total number of times a principal is signed in. |
478+
479+
| Attribute | Type | Description | Examples | Presence |
480+
|---|---|---|---|---|
481+
| `aspnetcore.authentication.scheme` | string | The authentication scheme. | `custom` | Always |
482+
| `error.type` | string | The error message. | `An error occurred during sign in` | If an authentication error or exception occured. |
483+
484+
.
485+
486+
##### Metric: `aspnetcore.authentication.sign_outs`
487+
488+
| Name | Instrument Type | Unit (UCUM) | Description |
489+
| -------- | --------------- | ----------- | -------------- |
490+
| `aspnetcore.authentication.sign_outs` <!--(https://opentelemetry.io/docs/specs/semconv/dotnet/dotnet-aspnetcore-metrics/)--> | Counter | `{request}` | The total number of times a scheme is challenged. |
491+
492+
| Attribute | Type | Description | Examples | Presence |
493+
|---|---|---|---|---|
494+
| `aspnetcore.authentication.scheme` | string | The authentication scheme. | `custom` | Always |
495+
| `error.type` | string | The error message. | `An error occurred during sign out` | If an authentication error or exception occured. |
496+
403497
:::moniker-end

0 commit comments

Comments
 (0)