Skip to content

Fix code fence issues in metrics and tracing documentation to prevent over-localization #47586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
72 changes: 36 additions & 36 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 `Microsoft.Extensions.Diagnostics.ResourceMonitoring` 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 `Microsoft.Extensions.Diagnostics.ResourceMonitoring` 8.8.0.

Expand All @@ -105,7 +105,7 @@ 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 `Microsoft.Extensions.Diagnostics.ResourceMonitoring` 9.8.0.

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

| 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 `Microsoft.Extensions.Diagnostics.ResourceMonitoring` 8.8.0.

Expand All @@ -125,35 +125,35 @@ The instrument is only available on a system running on containers either on Win

| 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.ObservableUpDownCounter`1> | `By` | Memory usage of all processes in the container measured in bytes. |

Available starting in `Microsoft.Extensions.Diagnostics.ResourceMonitoring` 9.8.0.

##### 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