diff --git a/docs/runtime/clr-metrics.md b/docs/runtime/clr-metrics.md index 1509635a68..186e254653 100644 --- a/docs/runtime/clr-metrics.md +++ b/docs/runtime/clr-metrics.md @@ -48,16 +48,37 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`GC.CollectionCount(int generation)`](https://learn.microsoft.com/en-us/dotnet/api/system.gc.collectioncount). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.gc.collections.count` | Counter | `{collection}` | Number of garbage collections that have occurred since the process started. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.gc.collections.count` | Counter | `{collection}` | Number of garbage collections that have occurred since the process started. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`clr.gc.generation`](/docs/attributes-registry/clr.md) | string | Name of the garbage collector heap generation. | `gen0`; `gen1`; `gen2`; `loh`; `poh` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + ### Metric: `clr.gc.objects.size` @@ -66,13 +87,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`GC.GetTotalMemory(false)`](https://learn.microsoft.com/en-us/dotnet/api/system.gc.gettotalmemory). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.gc.objects.size` | UpDownCounter | `By` | The number of bytes currently allocated on the managed GC heap. Fragmentation and other GC committed memory pools are excluded. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.gc.objects.size` | UpDownCounter | `By` | The number of bytes currently allocated on the managed GC heap. Fragmentation and other GC committed memory pools are excluded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.gc.allocations.size` @@ -81,13 +122,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`GC.GetTotalAllocatedBytes()`](https://learn.microsoft.com/en-us/dotnet/api/system.gc.gettotalallocatedbytes). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.gc.allocations.size` | Counter | `By` | The number of bytes allocated on the managed GC heap since the process started. The returned value does not include any native allocations. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.gc.allocations.size` | Counter | `By` | The number of bytes allocated on the managed GC heap since the process started. The returned value does not include any native allocations. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.gc.committed_memory.size` @@ -96,15 +157,37 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`GC.GetGCMemoryInfo().TotalCommittedBytes`](https://learn.microsoft.com/en-us/dotnet/api/system.gcmemoryinfo.totalcommittedbytes). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.gc.committed_memory.size` | UpDownCounter | `By` | The amount of committed virtual memory for the managed GC heap, as observed during the latest garbage collection. - [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.gc.committed_memory.size` | UpDownCounter | `By` | The amount of committed virtual memory for the managed GC heap, as observed during the latest garbage collection. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + **[1]:** 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. + + + + + + + + + + + + + + + + ### Metric: `clr.gc.heap.size` @@ -113,16 +196,37 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`GC.GetGCMemoryInfo().GenerationInfo.SizeAfterBytes`](https://learn.microsoft.com/en-us/dotnet/api/system.gcgenerationinfo.sizeafterbytes). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.gc.heap.size` | UpDownCounter | `By` | The heap size (including fragmentation), as observed during the latest garbage collection. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.gc.heap.size` | UpDownCounter | `By` | The heap size (including fragmentation), as observed during the latest garbage collection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`clr.gc.generation`](/docs/attributes-registry/clr.md) | string | Name of the garbage collector heap generation. | `gen0`; `gen1`; `gen2`; `loh`; `poh` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + ### Metric: `clr.gc.heap.fragmentation.size` @@ -131,16 +235,37 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`GC.GetGCMemoryInfo().GenerationInfo.FragmentationAfterBytes`](https://learn.microsoft.com/en-us/dotnet/api/system.gcgenerationinfo.fragmentationafterbytes). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.gc.heap.fragmentation.size` | UpDownCounter | `By` | The heap fragmentation, as observed during the latest garbage collection. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.gc.heap.fragmentation.size` | UpDownCounter | `By` | The heap fragmentation, as observed during the latest garbage collection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`clr.gc.generation`](/docs/attributes-registry/clr.md) | string | Name of the garbage collector heap generation. | `gen0`; `gen1`; `gen2`; `loh`; `poh` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + ### Metric: `clr.gc.duration` @@ -149,12 +274,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`GC.GetTotalPauseDuration()`](https://learn.microsoft.com/en-us/dotnet/api/system.gc.gettotalpauseduration). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `clr.gc.duration` | Counter | `ns` | The total amount of time paused in GC since the process started. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ## Just-In-Time (JIT) Compiler @@ -169,12 +315,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`JitInfo.GetCompiledILBytes()`](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.jitinfo.getcompiledilbytes). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `clr.jit.il_compiled.size` | Counter | `By` | Count of bytes of intermediate language that have been compiled since the process start. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.jit.methods_compiled.count` @@ -183,13 +350,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`JitInfo.GetCompiledMethodCount()`](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.jitinfo.getcompiledmethodcount). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.jit.methods_compiled.count` | Counter | `{method}` | The number of times the JIT compiler (re)compiled methods since the process start. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.jit.methods_compiled.count` | Counter | `{method}` | The number of times the JIT compiler (re)compiled methods since the process start. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.jit.compilation_time` @@ -198,13 +385,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`JitInfo.GetCompilationTime()`](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.jitinfo.getcompilationtime). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.jit.compilation_time` | Counter | `ns` | The amount of time the JIT compiler has spent compiling methods since the process start. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.jit.compilation_time` | Counter | `ns` | The amount of time the JIT compiler has spent compiling methods since the process start. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ## Thread pool @@ -219,12 +426,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`ThreadPool.ThreadCount`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.threadpool.threadcount). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `clr.thread_pool.threads.count` | UpDownCounter | `{thread}` | The number of thread pool threads that currently exist. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.thread_pool.work_items.count` @@ -233,13 +461,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`ThreadPool.CompletedWorkItemCount`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.threadpool.completedworkitemcount). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.thread_pool.work_items.count` | Counter | `{work_item}` | The number of work items that the thread pool has processed since the process start. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.thread_pool.work_items.count` | Counter | `{work_item}` | The number of work items that the thread pool has processed since the process start. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.thread_pool.queue.length` @@ -248,13 +496,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`ThreadPool.PendingWorkItemCount`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.threadpool.pendingworkitemcount). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.thread_pool.queue.length` | UpDownCounter | `{queue}` | The number of work items that are currently queued to be processed by the thread pool. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.thread_pool.queue.length` | UpDownCounter | `{queue}` | The number of work items that are currently queued to be processed by the thread pool. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ## General @@ -269,13 +537,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`Monitor.LockContentionCount`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.monitor.lockcontentioncount). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `clr.monitor.lock_contention.count` | Counter | `{contention}` | The number of times there was contention when trying to acquire a monitor lock since the process start. - | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clr.monitor.lock_contention.count` | Counter | `{contention}` | The number of times there was contention when trying to acquire a monitor lock since the process start. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.timer.count` @@ -284,12 +572,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`Timer.ActiveCount`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.timer.activecount). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `clr.timer.count` | UpDownCounter | `{timer}` | The number of timer instances that are currently active. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.assemblies.count` @@ -298,12 +607,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`AppDomain.CurrentDomain.GetAssemblies().Length`](https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.getassemblies). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `clr.assemblies.count` | UpDownCounter | `{assembly}` | The number of .NET assemblies that are currently loaded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + ### Metric: `clr.exceptions.count` @@ -312,12 +642,33 @@ This metric is [recommended][MetricRecommended]. This metric is obtained from [`AppDomain.CurrentDomain.FirstChanceException`](https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.firstchanceexception). + + + + + + | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `clr.exceptions.count` | Counter | `{exception}` | Count of exceptions that have been thrown in managed code. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + + + + + + + + [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md