この記事は英語の原文を日本語に翻訳したものです。原文: https://opentelemetry.io/docs/specs/semconv/runtime/dotnet-metrics/

翻訳元: open-telemetry/semantic-conventions v1.44.0(コミット e10a930

.NET Common Language Runtime(CLR)メトリクスに関するセマンティック規約

ステータス: Stable

この文書では、OpenTelemetryにおける.NET CLRランタイムメトリクスに関するセマンティック規約を定義します。

.NET CLRプロセス

ステータス: Stable

Description: 名前空間dotnet.process.*の下で取得される、プロセスに関する.NET Common Language Runtime(CLR)メトリクス。

注記: これらのメトリクスは、.NETプロセスの視点から観測された測定値を表しており、プロセスの外部から測定されたメトリクス(process.cpu.*process.memory.usageなど)とは異なる場合があります。

メトリクス: dotnet.process.cpu.count

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.process.cpu.countUpDownCounter{cpu}プロセスが利用できるプロセッサーの数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、Environment.ProcessorCountにアクセスした場合と同じ値を報告します。

メトリクス: dotnet.process.cpu.time

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.process.cpu.timeCountersプロセスが使用したCPU時間。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、System.Diagnostics.Processの対応するプロセッサー時間プロパティにアクセスした場合と同じ値を報告します。

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
cpu.modeRelease CandidateRequiredstringCPUのモードuser; system

cpu.modeには、次のよく知られた値の一覧があります。いずれかが該当する場合はその値を使用しなければならず(MUST)、それ以外の場合は独自の値を使ってもかまいません(MAY)。

ValueDescriptionStability
idleアイドルRelease Candidate
interrupt割り込みRelease Candidate
iowaitI/O待機Release Candidate
niceNiceRelease Candidate
stealStealRelease Candidate
systemシステムRelease Candidate
userユーザーRelease Candidate

メトリクス: dotnet.process.memory.working_set

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.process.memory.working_setUpDownCounterByプロセスのコンテキストにマップされている物理メモリのバイト数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、Environment.WorkingSetを呼び出した場合と同じ値を報告します。

.NET CLRのガーベジコレクション

ステータス: Stable

Description: 名前空間dotnet.gc.*の下で取得される、ガーベジコレクションに関する.NET Common Language Runtime(CLR)メトリクス。

メトリクス: dotnet.gc.collections

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.gc.collectionsCounter{collection}プロセスの起動以降に発生したガーベジコレクションの回数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、GC.CollectionCount(int generation) APIを使って、世代ごとの排他的なコレクション回数を計算します。

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
dotnet.gc.heap.generationStableRequiredstringガーベジコレクターが管理するヒープ世代の名前。gen0; gen1; gen2

dotnet.gc.heap.generationには、次のよく知られた値の一覧があります。いずれかが該当する場合はその値を使用しなければならず(MUST)、それ以外の場合は独自の値を使ってもかまいません(MAY)。

ValueDescriptionStability
gen0世代0Stable
gen1世代1Stable
gen2世代2Stable
lohLarge Object HeapStable
pohPinned Object HeapStable

メトリクス: dotnet.gc.heap.total_allocated

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.gc.heap.total_allocatedCounterByプロセスの起動以降に管理対象GCヒープへ割り当てられた、_おおよその_バイト数。返される値にはネイティブの割り当ては含まれません。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、GC.GetTotalAllocatedBytes()を呼び出した場合と同じ値を報告します。

メトリクス: dotnet.gc.last_collection.memory.committed_size

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.gc.last_collection.memory.committed_sizeUpDownCounterBy直近のガーベジコレクション時点で観測された、.NET GCが使用しているコミット済み仮想メモリの量。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、GC.GetGCMemoryInfo().TotalCommittedBytesを呼び出した場合と同じ値を報告します。コミット済み仮想メモリは、既存オブジェクトを格納するためのメモリ(ヒープサイズ)に加え、将来新たに割り当てられるオブジェクトを処理できるように準備された追加のメモリも含むため、ヒープサイズより大きくなることがあります。

メトリクス: dotnet.gc.last_collection.heap.size

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.gc.last_collection.heap.sizeUpDownCounterBy直近のガーベジコレクション時点で観測された、(フラグメンテーションを含む)管理対象GCヒープのサイズ。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、GC.GetGCMemoryInfo().GenerationInfo.SizeAfterBytesを呼び出した場合と同じ値を報告します。

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
dotnet.gc.heap.generationStableRequiredstringガーベジコレクターが管理するヒープ世代の名前。gen0; gen1; gen2

dotnet.gc.heap.generationには、次のよく知られた値の一覧があります。いずれかが該当する場合はその値を使用しなければならず(MUST)、それ以外の場合は独自の値を使ってもかまいません(MAY)。

ValueDescriptionStability
gen0世代0Stable
gen1世代1Stable
gen2世代2Stable
lohLarge Object HeapStable
pohPinned Object HeapStable

メトリクス: dotnet.gc.last_collection.heap.fragmentation.size

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.gc.last_collection.heap.fragmentation.sizeUpDownCounterBy直近のガーベジコレクション時点で観測された、ヒープのフラグメンテーション。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、GC.GetGCMemoryInfo().GenerationInfo.FragmentationAfterBytesを呼び出した場合と同じ値を報告します。

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
dotnet.gc.heap.generationStableRequiredstringガーベジコレクターが管理するヒープ世代の名前。gen0; gen1; gen2

dotnet.gc.heap.generationには、次のよく知られた値の一覧があります。いずれかが該当する場合はその値を使用しなければならず(MUST)、それ以外の場合は独自の値を使ってもかまいません(MAY)。

ValueDescriptionStability
gen0世代0Stable
gen1世代1Stable
gen2世代2Stable
lohLarge Object HeapStable
pohPinned Object HeapStable

メトリクス: dotnet.gc.pause.time

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.gc.pause.timeCountersプロセスの起動以降にGCによって一時停止していた時間の合計。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、GC.GetTotalPauseDuration()を呼び出した場合と同じ値を報告します。

.NET CLRのJust-In-Time(JIT)コンパイラー

ステータス: Stable

Description: 名前空間dotnet.jit.*の下で取得される、Just-In-Timeコンパイラーに関する.NET Common Language Runtime(CLR)メトリクス。

メトリクス: dotnet.jit.compiled_il.size

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.jit.compiled_il.sizeCounterByプロセスの起動以降にコンパイルされた中間言語のバイト数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、JitInfo.GetCompiledILBytes()を呼び出した場合と同じ値を報告します。

メトリクス: dotnet.jit.compiled_methods

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.jit.compiled_methodsCounter{method}プロセスの起動以降にJITコンパイラーがメソッドを(再)コンパイルした回数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、JitInfo.GetCompiledMethodCount()を呼び出した場合と同じ値を報告します。

メトリクス: dotnet.jit.compilation.time

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.jit.compilation.timeCountersプロセスの起動以降にJITコンパイラーがメソッドのコンパイルに費やした時間。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、JitInfo.GetCompilationTime()を呼び出した場合と同じ値を報告します。

.NET CLRのスレッドプール

ステータス: Stable

Description: 名前空間dotnet.thread_pool.*の下で取得される、スレッドプールに関する.NET Common Language Runtime(CLR)メトリクス。

メトリクス: dotnet.thread_pool.thread.count

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.thread_pool.thread.countUpDownCounter{thread}現在存在するスレッドプールスレッドの数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、ThreadPool.ThreadCountを呼び出した場合と同じ値を報告します。

メトリクス: dotnet.thread_pool.work_item.count

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.thread_pool.work_item.countCounter{work_item}プロセスの起動以降にスレッドプールが完了させた作業項目の数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、ThreadPool.CompletedWorkItemCountを呼び出した場合と同じ値を報告します。

メトリクス: dotnet.thread_pool.queue.length

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.thread_pool.queue.lengthUpDownCounter{work_item}現在スレッドプールによる処理を待ってキューに入っている作業項目の数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、ThreadPool.PendingWorkItemCountを呼び出した場合と同じ値を報告します。

.NET CLRの汎用メトリクス

ステータス: Stable

Description: その他の便利な.NET Common Language Runtime(CLR)メトリクス。

メトリクス: dotnet.monitor.lock_contentions

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.monitor.lock_contentionsCounter{contention}プロセスの起動以降にモニターロックの獲得を試みて競合が発生した回数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、Monitor.LockContentionCountを呼び出した場合と同じ値を報告します。

メトリクス: dotnet.timer.count

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.timer.countUpDownCounter{timer}現在アクティブなタイマーインスタンスの数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、Timer.ActiveCountを呼び出した場合と同じ値を報告します。

メトリクス: dotnet.assembly.count

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.assembly.countUpDownCounter{assembly}現在ロードされている.NETアセンブリの数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、AppDomain.CurrentDomain.GetAssemblies().Lengthを呼び出した場合と同じ値を報告します。

メトリクス: dotnet.exceptions

このメトリクスは推奨です。

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
dotnet.exceptionsCounter{exception}管理コード内でスローされた例外の数。[1]Stable

[1]: Meter名: System.Runtime; 追加バージョン: .NET 9.0。 このメトリクスは、AppDomain.CurrentDomain.FirstChanceExceptionへの呼び出し回数を数えた場合と同じ値を報告します。

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
error.typeStableRequiredstring操作が終了したエラーのクラスを記述します。System.OperationCanceledException; Contoso.MyException

error.typeには、次のよく知られた値の一覧があります。いずれかが該当する場合はその値を使用しなければならず(MUST)、それ以外の場合は独自の値を使ってもかまいません(MAY)。

ValueDescriptionStability
_OTHER計装がカスタム値を定義していない場合に使用されるフォールバックのエラー値。Stable