Mark .NET runtime metrics as stable (#1609)

Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
This commit is contained in:
Steve Gordon 2024-12-03 20:39:24 +00:00 committed by GitHub
parent c8024bf242
commit 41053b5079
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 98 additions and 74 deletions

View File

@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: dotnet
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Mark .NET runtime metrics as stable
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1602]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

View File

@ -12,7 +12,7 @@ This document defines .NET related attributes.
| Attribute | Type | Description | Examples | Stability | | Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---| |---|---|---|---|---|
| <a id="dotnet-gc-heap-generation" href="#dotnet-gc-heap-generation">`dotnet.gc.heap.generation`</a> | string | Name of the garbage collector managed heap generation. | `gen0`; `gen1`; `gen2` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | <a id="dotnet-gc-heap-generation" href="#dotnet-gc-heap-generation">`dotnet.gc.heap.generation`</a> | string | Name of the garbage collector managed heap generation. | `gen0`; `gen1`; `gen2` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
--- ---
@ -20,8 +20,8 @@ This document defines .NET related attributes.
| Value | Description | Stability | | Value | Description | Stability |
|---|---|---| |---|---|---|
| `gen0` | Generation 0 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen0` | Generation 0 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `gen1` | Generation 1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen1` | Generation 1 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `gen2` | Generation 2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen2` | Generation 2 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `loh` | Large Object Heap | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `loh` | Large Object Heap | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `poh` | Pinned Object Heap | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `poh` | Pinned Object Heap | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

View File

@ -4,7 +4,7 @@ linkTitle: .NET
# Semantic Conventions for .NET Common Language Runtime (CLR) Metrics # Semantic Conventions for .NET Common Language Runtime (CLR) Metrics
**Status**: [Experimental][DocumentStatus] **Status**: [Stable][DocumentStatus]
This document describes semantic conventions for .NET CLR runtime metrics in OpenTelemetry. This document describes semantic conventions for .NET CLR runtime metrics in OpenTelemetry.
@ -41,7 +41,7 @@ This document describes semantic conventions for .NET CLR runtime metrics in Ope
## .NET CLR Process ## .NET CLR Process
**Status**: [Experimental][DocumentStatus] **Status**: [Stable][DocumentStatus]
**Description:** .NET Common Language Runtime (CLR) metrics relating to the process, captured under the namespace `dotnet.process.*`. **Description:** .NET Common Language Runtime (CLR) metrics relating to the process, captured under the namespace `dotnet.process.*`.
@ -60,7 +60,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.process.cpu.count` | UpDownCounter | `{cpu}` | The number of processors available to the process. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.process.cpu.count` | UpDownCounter | `{cpu}` | The number of processors available to the process. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as accessing [`Environment.ProcessorCount`](https://learn.microsoft.com/dotnet/api/system.environment.processorcount). This metric reports the same values as accessing [`Environment.ProcessorCount`](https://learn.microsoft.com/dotnet/api/system.environment.processorcount).
@ -83,7 +83,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.process.cpu.time` | Counter | `s` | CPU time used by the process. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.process.cpu.time` | Counter | `s` | CPU time used by the process. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as accessing the corresponding processor time properties on [`System.Diagnostics.Process`](https://learn.microsoft.com/dotnet/api/system.diagnostics.process). This metric reports the same values as accessing the corresponding processor time properties on [`System.Diagnostics.Process`](https://learn.microsoft.com/dotnet/api/system.diagnostics.process).
@ -125,7 +125,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.process.memory.working_set` | UpDownCounter | `By` | The number of bytes of physical memory mapped to the process context. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.process.memory.working_set` | UpDownCounter | `By` | The number of bytes of physical memory mapped to the process context. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`Environment.WorkingSet`](https://learn.microsoft.com/dotnet/api/system.environment.workingset). This metric reports the same values as calling [`Environment.WorkingSet`](https://learn.microsoft.com/dotnet/api/system.environment.workingset).
@ -137,7 +137,7 @@ This metric reports the same values as calling [`Environment.WorkingSet`](https:
## .NET CLR Garbage Collection ## .NET CLR Garbage Collection
**Status**: [Experimental][DocumentStatus] **Status**: [Stable][DocumentStatus]
**Description:** .NET Common Language Runtime (CLR) metrics relating to garbage collection, captured under the namespace `dotnet.gc.*`. **Description:** .NET Common Language Runtime (CLR) metrics relating to garbage collection, captured under the namespace `dotnet.gc.*`.
@ -154,14 +154,14 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.gc.collections` | Counter | `{collection}` | The number of garbage collections that have occurred since the process has started. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.gc.collections` | Counter | `{collection}` | The number of garbage collections that have occurred since the process has started. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric uses the [`GC.CollectionCount(int generation)`](https://learn.microsoft.com/dotnet/api/system.gc.collectioncount) API to calculate exclusive collections per generation. This metric uses the [`GC.CollectionCount(int generation)`](https://learn.microsoft.com/dotnet/api/system.gc.collectioncount) API to calculate exclusive collections per generation.
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---| |---|---|---|---|---|---|
| [`dotnet.gc.heap.generation`](/docs/attributes-registry/dotnet.md) | string | Name of the garbage collector managed heap generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`dotnet.gc.heap.generation`](/docs/attributes-registry/dotnet.md) | string | Name of the garbage collector managed heap generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
--- ---
@ -169,11 +169,11 @@ This metric uses the [`GC.CollectionCount(int generation)`](https://learn.micros
| Value | Description | Stability | | Value | Description | Stability |
|---|---|---| |---|---|---|
| `gen0` | Generation 0 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen0` | Generation 0 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `gen1` | Generation 1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen1` | Generation 1 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `gen2` | Generation 2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen2` | Generation 2 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `loh` | Large Object Heap | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `loh` | Large Object Heap | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `poh` | Pinned Object Heap | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `poh` | Pinned Object Heap | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@ -193,7 +193,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.gc.heap.total_allocated` | Counter | `By` | The *approximate* number of bytes allocated on the managed GC heap since the process has started. The returned value does not include any native allocations. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.gc.heap.total_allocated` | Counter | `By` | The *approximate* number of bytes allocated on the managed GC heap since the process has started. The returned value does not include any native allocations. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`GC.GetTotalAllocatedBytes()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalallocatedbytes). This metric reports the same values as calling [`GC.GetTotalAllocatedBytes()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalallocatedbytes).
@ -216,7 +216,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.gc.last_collection.memory.committed_size` | UpDownCounter | `By` | The amount of committed virtual memory in use by the .NET GC, as observed during the latest garbage collection. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.gc.last_collection.memory.committed_size` | UpDownCounter | `By` | The amount of committed virtual memory in use by the .NET GC, as observed during the latest garbage collection. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`GC.GetGCMemoryInfo().TotalCommittedBytes`](https://learn.microsoft.com/dotnet/api/system.gcmemoryinfo.totalcommittedbytes). Committed virtual memory may be larger than the heap size because it includes both memory for storing existing objects (the heap size) and some extra memory that is ready to handle newly allocated objects in the future. This metric reports the same values as calling [`GC.GetGCMemoryInfo().TotalCommittedBytes`](https://learn.microsoft.com/dotnet/api/system.gcmemoryinfo.totalcommittedbytes). Committed virtual memory may be larger than the heap size because it includes both memory for storing existing objects (the heap size) and some extra memory that is ready to handle newly allocated objects in the future.
@ -239,14 +239,14 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.gc.last_collection.heap.size` | UpDownCounter | `By` | The managed GC heap size (including fragmentation), as observed during the latest garbage collection. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.gc.last_collection.heap.size` | UpDownCounter | `By` | The managed GC heap size (including fragmentation), as observed during the latest garbage collection. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`GC.GetGCMemoryInfo().GenerationInfo.SizeAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.sizeafterbytes). This metric reports the same values as calling [`GC.GetGCMemoryInfo().GenerationInfo.SizeAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.sizeafterbytes).
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---| |---|---|---|---|---|---|
| [`dotnet.gc.heap.generation`](/docs/attributes-registry/dotnet.md) | string | Name of the garbage collector managed heap generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`dotnet.gc.heap.generation`](/docs/attributes-registry/dotnet.md) | string | Name of the garbage collector managed heap generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
--- ---
@ -254,11 +254,11 @@ This metric reports the same values as calling [`GC.GetGCMemoryInfo().Generation
| Value | Description | Stability | | Value | Description | Stability |
|---|---|---| |---|---|---|
| `gen0` | Generation 0 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen0` | Generation 0 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `gen1` | Generation 1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen1` | Generation 1 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `gen2` | Generation 2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen2` | Generation 2 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `loh` | Large Object Heap | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `loh` | Large Object Heap | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `poh` | Pinned Object Heap | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `poh` | Pinned Object Heap | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@ -278,14 +278,14 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.gc.last_collection.heap.fragmentation.size` | UpDownCounter | `By` | The heap fragmentation, as observed during the latest garbage collection. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.gc.last_collection.heap.fragmentation.size` | UpDownCounter | `By` | The heap fragmentation, as observed during the latest garbage collection. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`GC.GetGCMemoryInfo().GenerationInfo.FragmentationAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.fragmentationafterbytes). This metric reports the same values as calling [`GC.GetGCMemoryInfo().GenerationInfo.FragmentationAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.fragmentationafterbytes).
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---| |---|---|---|---|---|---|
| [`dotnet.gc.heap.generation`](/docs/attributes-registry/dotnet.md) | string | Name of the garbage collector managed heap generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`dotnet.gc.heap.generation`](/docs/attributes-registry/dotnet.md) | string | Name of the garbage collector managed heap generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
--- ---
@ -293,11 +293,11 @@ This metric reports the same values as calling [`GC.GetGCMemoryInfo().Generation
| Value | Description | Stability | | Value | Description | Stability |
|---|---|---| |---|---|---|
| `gen0` | Generation 0 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen0` | Generation 0 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `gen1` | Generation 1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen1` | Generation 1 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `gen2` | Generation 2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `gen2` | Generation 2 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `loh` | Large Object Heap | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `loh` | Large Object Heap | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `poh` | Pinned Object Heap | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `poh` | Pinned Object Heap | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@ -317,7 +317,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.gc.pause.time` | Counter | `s` | The total amount of time paused in GC since the process has started. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.gc.pause.time` | Counter | `s` | The total amount of time paused in GC since the process has started. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`GC.GetTotalPauseDuration()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalpauseduration). This metric reports the same values as calling [`GC.GetTotalPauseDuration()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalpauseduration).
@ -329,7 +329,7 @@ This metric reports the same values as calling [`GC.GetTotalPauseDuration()`](ht
## .NET CLR Just-In-Time (JIT) Compiler ## .NET CLR Just-In-Time (JIT) Compiler
**Status**: [Experimental][DocumentStatus] **Status**: [Stable][DocumentStatus]
**Description:** .NET Common Language Runtime (CLR) metrics relating to the Just-In-Time compiler, captured under the namespace `dotnet.jit.*`. **Description:** .NET Common Language Runtime (CLR) metrics relating to the Just-In-Time compiler, captured under the namespace `dotnet.jit.*`.
@ -346,7 +346,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.jit.compiled_il.size` | Counter | `By` | Count of bytes of intermediate language that have been compiled since the process has started. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.jit.compiled_il.size` | Counter | `By` | Count of bytes of intermediate language that have been compiled since the process has started. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`JitInfo.GetCompiledILBytes()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledilbytes). This metric reports the same values as calling [`JitInfo.GetCompiledILBytes()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledilbytes).
@ -369,7 +369,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.jit.compiled_methods` | Counter | `{method}` | The number of times the JIT compiler (re)compiled methods since the process has started. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.jit.compiled_methods` | Counter | `{method}` | The number of times the JIT compiler (re)compiled methods since the process has started. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`JitInfo.GetCompiledMethodCount()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledmethodcount). This metric reports the same values as calling [`JitInfo.GetCompiledMethodCount()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledmethodcount).
@ -392,7 +392,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.jit.compilation.time` | Counter | `s` | The amount of time the JIT compiler has spent compiling methods since the process has started. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.jit.compilation.time` | Counter | `s` | The amount of time the JIT compiler has spent compiling methods since the process has started. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`JitInfo.GetCompilationTime()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompilationtime). This metric reports the same values as calling [`JitInfo.GetCompilationTime()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompilationtime).
@ -404,7 +404,7 @@ This metric reports the same values as calling [`JitInfo.GetCompilationTime()`](
## .NET CLR Thread pool ## .NET CLR Thread pool
**Status**: [Experimental][DocumentStatus] **Status**: [Stable][DocumentStatus]
**Description:** .NET Common Language Runtime (CLR) metrics relating to the thread pool, captured under the namespace `dotnet.thread_pool.*`. **Description:** .NET Common Language Runtime (CLR) metrics relating to the thread pool, captured under the namespace `dotnet.thread_pool.*`.
@ -421,7 +421,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.thread_pool.thread.count` | UpDownCounter | `{thread}` | The number of thread pool threads that currently exist. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.thread_pool.thread.count` | UpDownCounter | `{thread}` | The number of thread pool threads that currently exist. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`ThreadPool.ThreadCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.threadcount). This metric reports the same values as calling [`ThreadPool.ThreadCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.threadcount).
@ -444,7 +444,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.thread_pool.work_item.count` | Counter | `{work_item}` | The number of work items that the thread pool has completed since the process has started. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.thread_pool.work_item.count` | Counter | `{work_item}` | The number of work items that the thread pool has completed since the process has started. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`ThreadPool.CompletedWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.completedworkitemcount). This metric reports the same values as calling [`ThreadPool.CompletedWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.completedworkitemcount).
@ -467,7 +467,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.thread_pool.queue.length` | UpDownCounter | `{work_item}` | The number of work items that are currently queued to be processed by the thread pool. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.thread_pool.queue.length` | UpDownCounter | `{work_item}` | The number of work items that are currently queued to be processed by the thread pool. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`ThreadPool.PendingWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.pendingworkitemcount). This metric reports the same values as calling [`ThreadPool.PendingWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.pendingworkitemcount).
@ -479,7 +479,7 @@ This metric reports the same values as calling [`ThreadPool.PendingWorkItemCount
## .NET CLR General ## .NET CLR General
**Status**: [Experimental][DocumentStatus] **Status**: [Stable][DocumentStatus]
**Description:** Other useful .NET Common Language Runtime (CLR) metrics. **Description:** Other useful .NET Common Language Runtime (CLR) metrics.
@ -496,7 +496,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.monitor.lock_contentions` | Counter | `{contention}` | The number of times there was contention when trying to acquire a monitor lock since the process has started. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.monitor.lock_contentions` | Counter | `{contention}` | The number of times there was contention when trying to acquire a monitor lock since the process has started. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`Monitor.LockContentionCount`](https://learn.microsoft.com/dotnet/api/system.threading.monitor.lockcontentioncount). This metric reports the same values as calling [`Monitor.LockContentionCount`](https://learn.microsoft.com/dotnet/api/system.threading.monitor.lockcontentioncount).
@ -519,7 +519,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.timer.count` | UpDownCounter | `{timer}` | The number of timer instances that are currently active. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.timer.count` | UpDownCounter | `{timer}` | The number of timer instances that are currently active. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`Timer.ActiveCount`](https://learn.microsoft.com/dotnet/api/system.threading.timer.activecount). This metric reports the same values as calling [`Timer.ActiveCount`](https://learn.microsoft.com/dotnet/api/system.threading.timer.activecount).
@ -542,7 +542,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.assembly.count` | UpDownCounter | `{assembly}` | The number of .NET assemblies that are currently loaded. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.assembly.count` | UpDownCounter | `{assembly}` | The number of .NET assemblies that are currently loaded. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as calling [`AppDomain.CurrentDomain.GetAssemblies().Length`](https://learn.microsoft.com/dotnet/api/system.appdomain.getassemblies). This metric reports the same values as calling [`AppDomain.CurrentDomain.GetAssemblies().Length`](https://learn.microsoft.com/dotnet/api/system.appdomain.getassemblies).
@ -565,7 +565,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | | Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- | | -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.exceptions` | Counter | `{exception}` | The number of exceptions that have been thrown in managed code. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `dotnet.exceptions` | Counter | `{exception}` | The number of exceptions that have been thrown in managed code. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0. **[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as counting calls to [`AppDomain.CurrentDomain.FirstChanceException`](https://learn.microsoft.com/dotnet/api/system.appdomain.firstchanceexception). This metric reports the same values as counting calls to [`AppDomain.CurrentDomain.FirstChanceException`](https://learn.microsoft.com/dotnet/api/system.appdomain.firstchanceexception).

View File

@ -6,28 +6,28 @@ groups:
This document defines .NET related attributes. This document defines .NET related attributes.
attributes: attributes:
- id: dotnet.gc.heap.generation - id: dotnet.gc.heap.generation
stability: experimental stability: stable
type: type:
members: members:
- id: gen0 - id: gen0
value: 'gen0' value: 'gen0'
brief: "Generation 0" brief: "Generation 0"
stability: experimental stability: stable
- id: gen1 - id: gen1
value: 'gen1' value: 'gen1'
brief: "Generation 1" brief: "Generation 1"
stability: experimental stability: stable
- id: gen2 - id: gen2
value: 'gen2' value: 'gen2'
brief: "Generation 2" brief: "Generation 2"
stability: experimental stability: stable
- id: loh - id: loh
value: 'loh' value: 'loh'
brief: "Large Object Heap" brief: "Large Object Heap"
stability: experimental stability: stable
- id: poh - id: poh
value: 'poh' value: 'poh'
brief: "Pinned Object Heap" brief: "Pinned Object Heap"
stability: experimental stability: stable
brief: Name of the garbage collector managed heap generation. brief: Name of the garbage collector managed heap generation.
examples: ["gen0", "gen1", "gen2"] examples: ["gen0", "gen1", "gen2"]

View File

@ -9,7 +9,7 @@ groups:
This metric reports the same values as accessing [`Environment.ProcessorCount`](https://learn.microsoft.com/dotnet/api/system.environment.processorcount). This metric reports the same values as accessing [`Environment.ProcessorCount`](https://learn.microsoft.com/dotnet/api/system.environment.processorcount).
instrument: updowncounter instrument: updowncounter
unit: "{cpu}" unit: "{cpu}"
stability: experimental stability: stable
- id: metric.dotnet.process.cpu.time - id: metric.dotnet.process.cpu.time
type: metric type: metric
@ -22,7 +22,7 @@ groups:
processor time properties on [`System.Diagnostics.Process`](https://learn.microsoft.com/dotnet/api/system.diagnostics.process). processor time properties on [`System.Diagnostics.Process`](https://learn.microsoft.com/dotnet/api/system.diagnostics.process).
instrument: counter instrument: counter
unit: "s" unit: "s"
stability: experimental stability: stable
attributes: attributes:
- ref: cpu.mode - ref: cpu.mode
requirement_level: required requirement_level: required
@ -37,7 +37,7 @@ groups:
This metric reports the same values as calling [`Environment.WorkingSet`](https://learn.microsoft.com/dotnet/api/system.environment.workingset). This metric reports the same values as calling [`Environment.WorkingSet`](https://learn.microsoft.com/dotnet/api/system.environment.workingset).
instrument: updowncounter instrument: updowncounter
unit: "By" unit: "By"
stability: experimental stability: stable
- id: metric.dotnet.gc.collections - id: metric.dotnet.gc.collections
type: metric type: metric
@ -50,7 +50,7 @@ groups:
API to calculate exclusive collections per generation. API to calculate exclusive collections per generation.
instrument: counter instrument: counter
unit: "{collection}" unit: "{collection}"
stability: experimental stability: stable
attributes: attributes:
- ref: dotnet.gc.heap.generation - ref: dotnet.gc.heap.generation
requirement_level: required requirement_level: required
@ -67,7 +67,7 @@ groups:
This metric reports the same values as calling [`GC.GetTotalAllocatedBytes()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalallocatedbytes). This metric reports the same values as calling [`GC.GetTotalAllocatedBytes()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalallocatedbytes).
instrument: counter instrument: counter
unit: "By" unit: "By"
stability: experimental stability: stable
- id: metric.dotnet.gc.last_collection.memory.committed_size - id: metric.dotnet.gc.last_collection.memory.committed_size
type: metric type: metric
@ -86,7 +86,7 @@ groups:
future. future.
instrument: updowncounter instrument: updowncounter
unit: "By" unit: "By"
stability: experimental stability: stable
- id: metric.dotnet.gc.last_collection.heap.size - id: metric.dotnet.gc.last_collection.heap.size
type: metric type: metric
@ -101,7 +101,7 @@ groups:
[`GC.GetGCMemoryInfo().GenerationInfo.SizeAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.sizeafterbytes). [`GC.GetGCMemoryInfo().GenerationInfo.SizeAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.sizeafterbytes).
instrument: updowncounter instrument: updowncounter
unit: "By" unit: "By"
stability: experimental stability: stable
attributes: attributes:
- ref: dotnet.gc.heap.generation - ref: dotnet.gc.heap.generation
requirement_level: required requirement_level: required
@ -118,7 +118,7 @@ groups:
[`GC.GetGCMemoryInfo().GenerationInfo.FragmentationAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.fragmentationafterbytes). [`GC.GetGCMemoryInfo().GenerationInfo.FragmentationAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.fragmentationafterbytes).
instrument: updowncounter instrument: updowncounter
unit: "By" unit: "By"
stability: experimental stability: stable
attributes: attributes:
- ref: dotnet.gc.heap.generation - ref: dotnet.gc.heap.generation
requirement_level: required requirement_level: required
@ -133,7 +133,7 @@ groups:
This metric reports the same values as calling [`GC.GetTotalPauseDuration()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalpauseduration). This metric reports the same values as calling [`GC.GetTotalPauseDuration()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalpauseduration).
instrument: counter instrument: counter
unit: "s" unit: "s"
stability: experimental stability: stable
- id: metric.dotnet.jit.compiled_il.size - id: metric.dotnet.jit.compiled_il.size
type: metric type: metric
@ -146,7 +146,7 @@ groups:
[`JitInfo.GetCompiledILBytes()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledilbytes). [`JitInfo.GetCompiledILBytes()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledilbytes).
instrument: counter instrument: counter
unit: "By" unit: "By"
stability: experimental stability: stable
- id: metric.dotnet.jit.compiled_methods - id: metric.dotnet.jit.compiled_methods
type: metric type: metric
@ -161,7 +161,7 @@ groups:
[`JitInfo.GetCompiledMethodCount()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledmethodcount). [`JitInfo.GetCompiledMethodCount()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledmethodcount).
instrument: counter instrument: counter
unit: "{method}" unit: "{method}"
stability: experimental stability: stable
- id: metric.dotnet.jit.compilation.time - id: metric.dotnet.jit.compilation.time
type: metric type: metric
@ -176,7 +176,7 @@ groups:
[`JitInfo.GetCompilationTime()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompilationtime). [`JitInfo.GetCompilationTime()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompilationtime).
instrument: counter instrument: counter
unit: "s" unit: "s"
stability: experimental stability: stable
- id: metric.dotnet.monitor.lock_contentions - id: metric.dotnet.monitor.lock_contentions
type: metric type: metric
@ -191,7 +191,7 @@ groups:
[`Monitor.LockContentionCount`](https://learn.microsoft.com/dotnet/api/system.threading.monitor.lockcontentioncount). [`Monitor.LockContentionCount`](https://learn.microsoft.com/dotnet/api/system.threading.monitor.lockcontentioncount).
instrument: counter instrument: counter
unit: "{contention}" unit: "{contention}"
stability: experimental stability: stable
- id: metric.dotnet.thread_pool.thread.count - id: metric.dotnet.thread_pool.thread.count
type: metric type: metric
@ -203,7 +203,7 @@ groups:
This metric reports the same values as calling [`ThreadPool.ThreadCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.threadcount). This metric reports the same values as calling [`ThreadPool.ThreadCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.threadcount).
instrument: updowncounter instrument: updowncounter
unit: "{thread}" unit: "{thread}"
stability: experimental stability: stable
- id: metric.dotnet.thread_pool.work_item.count - id: metric.dotnet.thread_pool.work_item.count
type: metric type: metric
@ -218,7 +218,7 @@ groups:
[`ThreadPool.CompletedWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.completedworkitemcount). [`ThreadPool.CompletedWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.completedworkitemcount).
instrument: counter instrument: counter
unit: "{work_item}" unit: "{work_item}"
stability: experimental stability: stable
- id: metric.dotnet.thread_pool.queue.length - id: metric.dotnet.thread_pool.queue.length
type: metric type: metric
@ -233,7 +233,7 @@ groups:
[`ThreadPool.PendingWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.pendingworkitemcount). [`ThreadPool.PendingWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.pendingworkitemcount).
instrument: updowncounter instrument: updowncounter
unit: "{work_item}" unit: "{work_item}"
stability: experimental stability: stable
- id: metric.dotnet.timer.count - id: metric.dotnet.timer.count
type: metric type: metric
@ -245,7 +245,7 @@ groups:
This metric reports the same values as calling [`Timer.ActiveCount`](https://learn.microsoft.com/dotnet/api/system.threading.timer.activecount). This metric reports the same values as calling [`Timer.ActiveCount`](https://learn.microsoft.com/dotnet/api/system.threading.timer.activecount).
instrument: updowncounter instrument: updowncounter
unit: "{timer}" unit: "{timer}"
stability: experimental stability: stable
- id: metric.dotnet.assembly.count - id: metric.dotnet.assembly.count
type: metric type: metric
@ -258,7 +258,7 @@ groups:
[`AppDomain.CurrentDomain.GetAssemblies().Length`](https://learn.microsoft.com/dotnet/api/system.appdomain.getassemblies). [`AppDomain.CurrentDomain.GetAssemblies().Length`](https://learn.microsoft.com/dotnet/api/system.appdomain.getassemblies).
instrument: updowncounter instrument: updowncounter
unit: "{assembly}" unit: "{assembly}"
stability: experimental stability: stable
- id: metric.dotnet.exceptions - id: metric.dotnet.exceptions
type: metric type: metric
@ -271,7 +271,7 @@ groups:
[`AppDomain.CurrentDomain.FirstChanceException`](https://learn.microsoft.com/dotnet/api/system.appdomain.firstchanceexception). [`AppDomain.CurrentDomain.FirstChanceException`](https://learn.microsoft.com/dotnet/api/system.appdomain.firstchanceexception).
instrument: counter instrument: counter
unit: "{exception}" unit: "{exception}"
stability: experimental stability: stable
attributes: attributes:
- ref: error.type - ref: error.type
note: "" note: ""

View File

@ -12,6 +12,8 @@ deny[group_stability_violation(description, group.id, name)] {
"metric.kestrel.connection.duration", "metric.kestrel.tls_handshake.duration", "metric.kestrel.connection.duration", "metric.kestrel.tls_handshake.duration",
# TODO: https://github.com/open-telemetry/semantic-conventions/issues/1519 # TODO: https://github.com/open-telemetry/semantic-conventions/issues/1519
"resource.service", "resource.service",
# TODO: https://github.com/open-telemetry/semantic-conventions/issues/1616
"metric.dotnet.process.cpu.time",
} }
not exceptions[group.id] not exceptions[group.id]