Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions docs/core/diagnostics/built-in-metrics-diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,42 @@ You can enable these metrics by calling the <xref:Microsoft.Extensions.Dependenc

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `dotnet.health_check.reports` | Counter | `{report}` | Number of times a health report reported the health status of an application. |
| `dotnet.health_check.reports` | <xref:System.Diagnostics.Metrics.Counter`1> | `{report}` | Number of times a health report reported the health status of an application. |

| Attribute | Type | Description | Examples | Presence |
|---|---|---|---|---|
| `dotnet.health_check.status` | string | The health status of an application. | `Healthy`; `Unhealthy` | Always |
| Attribute | Type | Description | Examples | Presence |
|------------------------------|----------|--------------------------------------|------------------------|----------|
| `dotnet.health_check.status` | `string` | The health status of an application. | `Healthy`; `Unhealthy` | Always |

`dotnet.health_check.status` is one of the following:

| Value | Description |
|---|---|
| `Degraded` | An application was in degraded state. |
| `Healthy` | An application was healthy. |
| `Unhealthy` | An application was unhealthy. |
| Value | Description |
|-------------|---------------------------------------|
| `Degraded` | An application was in degraded state. |
| `Healthy` | An application was healthy. |
| `Unhealthy` | An application was unhealthy. |

Available starting in: .NET 8.0.
Available starting in: .NET 8.

##### Metric: `dotnet.health_check.unhealthy_checks`

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `dotnet.health_check.unhealthy_checks` | Counter | `{unhealthy_check}` | Number of times a health check reported the health status of an application as `Degraded` or `Unhealthy`. |
| `dotnet.health_check.unhealthy_checks` | <xref:System.Diagnostics.Metrics.Counter`1> | `{unhealthy_check}` | Number of times a health check reported the health status of an application as `Degraded` or `Unhealthy`. |

| Attribute | Type | Description | Examples | Presence |
|---|---|---|---|---|
| `dotnet.health_check.name` | string | The name of the health check. | `ApplicationLifecycle` | Always |
| `dotnet.health_check.status` | string | The health status of an application. | `Healthy`; `Unhealthy` | Always |
| Attribute | Type | Description | Examples | Presence |
|------------------------------|----------|--------------------------------------|------------------------|----------|
| `dotnet.health_check.name` | `string` | The name of the health check. | `ApplicationLifecycle` | Always |
| `dotnet.health_check.status` | `string` | The health status of an application. | `Healthy`; `Unhealthy` | Always |

`dotnet.health_check.status` is one of the following:

| Value | Description |
|---|---|
| `Degraded` | An application was in degraded state. |
| `Healthy` | An application was healthy. |
| `Unhealthy` | An application was unhealthy. |
| Value | Description |
|-------------|---------------------------------------|
| `Degraded` | An application was in degraded state. |
| `Healthy` | An application was healthy. |
| `Unhealthy` | An application was unhealthy. |

Available starting in: .NET 8.0.
Available starting in: .NET 8.

## `Microsoft.Extensions.Diagnostics.ResourceMonitoring`

Expand All @@ -85,7 +85,7 @@ The instrument is only available on a system running on containers both on Windo

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `container.cpu.limit.utilization` | ObservableGauge | `1` | The CPU consumption of the running containerized application relative to resource limit in range `[0, 1]`. |
| `container.cpu.limit.utilization` | <xref:System.Diagnostics.Metrics.ObservableGauge`1> | `1` | The CPU consumption of the running containerized application relative to resource limit in range `[0, 1]`. |

Available starting in: .NET 8.8.0.

Expand All @@ -95,7 +95,7 @@ The instrument is only available on a system running on containers on Linux.

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `container.cpu.request.utilization` | ObservableGauge | `1` | The CPU consumption of the running containerized application relative to resource request in range `[0, 1]`. |
| `container.cpu.request.utilization` | <xref:System.Diagnostics.Metrics.ObservableGauge`1> | `1` | The CPU consumption of the running containerized application relative to resource request in range `[0, 1]`. |

Available starting in: .NET 8.8.0.

Expand All @@ -105,55 +105,55 @@ The instrument is only available on a system running on a container either on Wi

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `container.cpu.time` | ObservableCounter | `s` | CPU time used by the container. |
| `container.cpu.time` | <xref:System.Diagnostics.Metrics.ObservableCounter`1> | `s` | CPU time used by the container. |

Available starting in: .NET 9.8.0.
Available starting in: .NET 9.

##### Metric: `container.memory.limit.utilization`

The instrument is only available on a system running on containers both on Windows and Linux.

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `container.memory.limit.utilization` | ObservableGauge | `1` | The memory consumption of the running containerized application relative to resource limit in range `[0, 1]`. |
| `container.memory.limit.utilization` | <xref:System.Diagnostics.Metrics.ObservableGauge`1> | `1` | The memory consumption of the running containerized application relative to resource limit in range `[0, 1]`. |

Available starting in: .NET 8.8.0.
Available starting in: .NET 8.

##### Metric: `container.memory.usage`

The instrument is only available on a system running on containers either on Windows or Linux.

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `container.memory.usage` | ObservableUpDownCounter | `By` | Memory usage of all processes in the container measured in bytes. |
| `container.memory.usage` | <xref:System.Diagnostics.Metrics.<xref:System.Diagnostics.Metrics.ObservableUpDownCounter`1>`1> | `By` | Memory usage of all processes in the container measured in bytes. |

Available starting in: .NET 9.8.0.
Available starting in: .NET 9.

##### Metric: `process.cpu.utilization`

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `process.cpu.utilization` | ObservableGauge | `1` | The CPU consumption of the running application in range `[0, 1]`. |
| `process.cpu.utilization` | <xref:System.Diagnostics.Metrics.ObservableGauge`1> | `1` | The CPU consumption of the running application in range `[0, 1]`. |

Available starting in: .NET 8.0.
Available starting in: .NET 8.

##### Metric: `dotnet.process.memory.virtual.utilization`

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `dotnet.process.memory.virtual.utilization` | ObservableGauge | `1` | The memory consumption of the running application in range `[0, 1]`. |
| `dotnet.process.memory.virtual.utilization` | <xref:System.Diagnostics.Metrics.ObservableGauge`1> | `1` | The memory consumption of the running application in range `[0, 1]`. |

Available starting in: .NET 8.0.
Available starting in: .NET 8.

##### Metric: `system.network.connections`

| Name | Instrument Type | Unit (UCUM) | Description |
| ---- | --------------- | ----------- | ----------- |
| `system.network.connections` | ObservableUpDownCounter | `{connection}` | Number of network connections by state. |
| `system.network.connections` | <xref:System.Diagnostics.Metrics.ObservableUpDownCounter`1> | `{connection}` | Number of network connections by state. |

| Attribute | Type | Description | Examples | Presence |
|---|---|---|---|---|
| `network.type` | string | OSI network layer or non-OSI equivalent. | `ipv4`; `ipv6` | Always |
| `system.network.state` | string | The state of a network connection. | `close`; `listen` | Always |
| Attribute | Type | Description | Examples | Presence |
|------------------------|----------|------------------------------------------|-------------------|----------|
| `network.type` | `string` | OSI network layer or non-OSI equivalent. | `ipv4`; `ipv6` | Always |
| `system.network.state` | `string` | The state of a network connection. | `close`; `listen` | Always |

Available starting in: .NET 8.0.
Available starting in: .NET 8.
Loading
Loading