> Source: https://www.ymotongpoo.com/works/otel-specs-ja/semconv/system/process-metrics/


# OSプロセスメトリクスに関するセマンティック規約

**ステータス**: [Development][DocumentStatus]

この文書では、OpenTelemetryにおける一般的なOSプロセスレベルのメトリクスのInstrumentと属性について説明します。この文書で明示的に定義されていないInstrumentを作成する際は、[汎用のメトリクスセマンティック規約](/works/otel-specs-ja/semconv/general/metrics/#一般的なガイドライン)も参照してください。OSプロセスメトリクスはプログラムのランタイム環境とは関係がなく、オペレーティングシステムから計測を行うべきです。ランタイム環境のメトリクスについては、[ランタイム環境のメトリクスに関するセマンティック規約](/works/otel-specs-ja/semconv/runtime/#メトリクス)を参照してください。

> [!IMPORTANT]
> [この文書のv1.21.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/system/process-metrics.md)
> 以前のバージョンを使っている既存の計装やコレクターは、次に従うべきです。
>
> * System semantic conventionsが安定版として宣言されるまで、この文書の破壊的変更を取り込むべきではありません（SHOULD NOT）。規約には、属性、メトリクス名、計測単位などが含まれますが、これらに限定されません。
> * 移行計画が確定した後、ユーザーが新しい規約にopt-inできるようにする制御機構を導入すべきです（SHOULD）。

## プロセスメトリクス

### メトリクス: `process.cpu.time`

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

<!-- semconv metric.process.cpu.time -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.cpu.time` | Counter | `s` | 異なるCPUモード別に分けられた合計CPU秒数。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

**Attributes:**

| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`cpu.mode`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cpu/) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | このデータポイントのCPUモード。[1] | `user`; `system` |

**[1] `cpu.mode`:** `cpu.mode`には次の値を使用すべきです（SHOULD）: `user`、`system`、`wait`。特定のプラットフォームが独自のモードの集合を要求しない限り、他のモードを使用すべきではありません（SHOULD NOT）。

---

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

| Value | Description | Stability |
| --- | --- | --- |
| `idle` | Idle | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `interrupt` | Interrupt | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `iowait` | IO Wait | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `nice` | Nice | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `steal` | Steal | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `system` | System | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `user` | User | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.cpu.utilization`

このメトリクスは[opt-in][MetricOptIn]です。

<!-- semconv metric.process.cpu.utilization -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.cpu.utilization` | Gauge | `1` | 前回の計測からのprocess.cpu.timeの差分を、経過時間とプロセスが利用可能なCPU数で割った値。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

**Attributes:**

| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`cpu.mode`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cpu/) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | このデータポイントのCPUモード。[1] | `user`; `system` |

**[1] `cpu.mode`:** `cpu.mode`には次の値を使用すべきです（SHOULD）: `user`、`system`、`wait`。特定のプラットフォームが独自のモードの集合を要求しない限り、他のモードを使用すべきではありません（SHOULD NOT）。

---

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

| Value | Description | Stability |
| --- | --- | --- |
| `idle` | Idle | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `interrupt` | Interrupt | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `iowait` | IO Wait | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `nice` | Nice | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `steal` | Steal | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `system` | System | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `user` | User | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.memory.usage`

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

<!-- semconv metric.process.memory.usage -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.memory.usage` | UpDownCounter | `By` | 使用中の物理メモリの量。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.memory.virtual`

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

<!-- semconv metric.process.memory.virtual -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.memory.virtual` | UpDownCounter | `By` | コミットされた仮想メモリの量。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.memory.utilization`

このメトリクスは[opt-in][MetricOptIn]です。

<!-- semconv metric.process.memory.utilization -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.memory.utilization` | Gauge | `1` | プロセスが使用している、物理メモリ全体に対する割合。 | ![Development](https://img.shields.io/badge/-development-blue) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.disk.io`

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

<!-- semconv metric.process.disk.io -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.disk.io` | Counter | `By` | 転送されたディスクバイト数。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

**Attributes:**

| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`disk.io.direction`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/disk/) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | ディスクIO操作の方向。 | `read` |

---

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

| Value | Description | Stability |
| --- | --- | --- |
| `read` | read | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `write` | write | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.disk.operations`

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

<!-- semconv metric.process.disk.operations -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.disk.operations` | Counter | `{operation}` | プロセスが実行したディスク操作の数。 | ![Development](https://img.shields.io/badge/-development-blue) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

**Attributes:**

| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`disk.io.direction`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/disk/) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | ディスクIO操作の方向。 | `read` |

---

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

| Value | Description | Stability |
| --- | --- | --- |
| `read` | read | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `write` | write | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.network.io`

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

<!-- semconv metric.process.network.io -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.network.io` | Counter | `By` | 転送されたネットワークバイト数。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

**Attributes:**

| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`network.io.direction`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/network/) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | 観測対象ホストの物理または仮想ネットワークインターフェースの視点から見たトラフィックの方向。ステートフルな接続やネットワークフローの論理的な方向を表すために使用すべきではありません。 | `transmit` |

---

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

| Value | Description | Stability |
| --- | --- | --- |
| `receive` | receive | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `transmit` | transmit | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.thread.count`

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

<!-- semconv metric.process.thread.count -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.thread.count` | UpDownCounter | `{thread}` | プロセスのスレッド数。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.unix.file_descriptor.count`

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

<!-- semconv metric.process.unix.file_descriptor.count -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.unix.file_descriptor.count` | UpDownCounter | `{file_descriptor}` | プロセスが使用しているUNIXファイルディスクリプタの数。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.windows.handle.count`

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

<!-- semconv metric.process.windows.handle.count -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.windows.handle.count` | UpDownCounter | `{handle}` | プロセスが保持しているハンドル数。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.context_switches`

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

<!-- semconv metric.process.context_switches -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.context_switches` | Counter | `{context_switch}` | プロセスがコンテキストスイッチされた回数。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

**Attributes:**

| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`process.context_switch.type`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/process/) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | このデータポイントのコンテキストスイッチが自発的（voluntary）か非自発的（involuntary）かを指定します。 | `voluntary`; `involuntary` |

---

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

| Value | Description | Stability |
| --- | --- | --- |
| `involuntary` | involuntary | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `voluntary` | voluntary | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.paging.faults`

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

<!-- semconv metric.process.paging.faults -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.paging.faults` | Counter | `{fault}` | プロセスが発生させたページフォルトの数。 | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

**Attributes:**

| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`system.paging.fault.type`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/system/) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | ページングフォルトの種別。値は`major`または`minor`のいずれかでなければなりません（MUST）。この属性なしでメトリクスが報告される場合は、メジャーフォルトとマイナーフォルトの合計であるべきです。 | `minor` |

---

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

| Value | Description | Stability |
| --- | --- | --- |
| `major` | major | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
| `minor` | minor | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.signals_pending`

このメトリクスは[opt-in][MetricOptIn]です。

<!-- semconv metric.process.signals_pending -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.signals_pending` | UpDownCounter | `{signal}` | プロセスの保留中シグナルの数。 | ![Development](https://img.shields.io/badge/-development-blue) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `process.uptime`

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

<!-- semconv metric.process.uptime -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `process.uptime` | Gauge | `s` | プロセスが実行されている時間。[1] | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | [`process`](https://opentelemetry.io/docs/specs/semconv/registry/entities/process/#process) |

**[1]:** 計装は、`double`型のgaugeを使用し、利用可能な最高精度の浮動小数点数で稼働時間を秒単位で計測すべきです（SHOULD）。
実際の精度は計装とオペレーティングシステムに依存します。

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
[MetricRecommended]: /works/otel-specs-ja/semconv/general/metric-requirement-level/#recommended
[MetricOptIn]: /works/otel-specs-ja/semconv/general/metric-requirement-level/#opt-in

