Skip to content

Commit

Permalink
rename metrics and attributes for spec compliance
Browse files Browse the repository at this point in the history
Rename metrics that are updowncounters to use the `.count` naming
convention. Also rename attributes to not use metric names as
namespaces.
  • Loading branch information
braydonk committed Nov 7, 2023
1 parent 232202f commit e10cc9a
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 134 deletions.
30 changes: 15 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,23 @@ release.

## Unreleased

<<<<<<< HEAD
### Breaking

- BREAKING: Generate process metrics from YAML
([#330](https://github.com/open-telemetry/semantic-conventions/pull/330))
- Rename attributes for `process.cpu.*`
- `state` to `process.cpu.state`
- Rename attributes for `process.disk.io`
- `direction` to `process.disk.io_direction`
- Rename attributes for `process.network.io`
- `direction` to `process.network.io_direction`
- Rename `process.threads` to `process.thread.count`
- Rename `process.open_file_descriptors` to `process.open_file_descriptor.count`
- Rename attributes for `process.context_switches`
- `type` to `process.context_switch_type`
- Rename attributes for `process.paging.faults`
- `type` to `process.paging.fault_type`

### Features

### Fixes
Expand Down Expand Up @@ -106,24 +120,10 @@ stabilized.
## v1.22.0 (2023-10-12)

- Remove experimental Kafka metrics ([#338](https://github.com/open-telemetry/semantic-conventions/pull/338))
=======
>>>>>>> 0f8b883 (adding conflict fix I forgot to save)
- Adds `session.id` and session.md to general docs and model
([#215](https://github.com/open-telemetry/semantic-conventions/pull/215))
- Add `container.labels.<key>` attributes.
([#125](https://github.com/open-telemetry/semantic-conventions/pull/125))
- BREAKING: Generate process metrics from YAML
([#330](https://github.com/open-telemetry/semantic-conventions/pull/330))
- Rename attributes for `process.cpu.*`
- `state` to `process.cpu.state`
- Rename attributes for `process.disk.io`
- `direction` to `process.disk.io.direction`
- Rename attributes for `process.network.io`
- `direction` to `process.network.io.direction`
- Rename attributes for `process.context_switches`
- `type` to `process.context_switches.type`
- Rename attributes for `process.paging.faults`
- `type` to `process.paging.faults.type`
- Add `cluster.name` and `node.name` attributes to Elasticsearch semantic conventions.
([#285](https://github.com/open-telemetry/semantic-conventions/pull/285))
- Fix the unit of metric.process.runtime.jvm.system.cpu.load_1m to be {run_queue_item}
Expand Down
170 changes: 85 additions & 85 deletions docs/system/process-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ metrics](/docs/runtime/README.md#metrics).
- [Metric: `process.memory.virtual`](#metric-processmemoryvirtual)
- [Metric: `process.disk.io`](#metric-processdiskio)
- [Metric: `process.network.io`](#metric-processnetworkio)
- [Metric: `process.threads`](#metric-processthreads)
- [Metric: `process.open_file_descriptors`](#metric-processopen_file_descriptors)
- [Metric: `process.thread.count`](#metric-processthreadcount)
- [Metric: `process.open_file_descriptor.count`](#metric-processopen_file_descriptorcount)
- [Metric: `process.context_switches`](#metric-processcontext_switches)
- [Metric: `process.paging.faults`](#metric-processpagingfaults)

Expand All @@ -39,53 +39,53 @@ metrics](/docs/runtime/README.md#metrics).
### Metric: `process.cpu.time`

<!-- semconv metric.process.cpu.time(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| ------------------ | --------------- | ----------- | -------------------------------------------------- |
| `process.cpu.time` | Counter | `s` | Total CPU seconds broken down by different states. |
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.cpu.time` | Counter | `s` | Total CPU seconds broken down by different states. |
<!-- endsemconv -->

<!-- semconv metric.process.cpu.time(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
| ------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------- |
| `process.cpu.state` | string | The CPU state for this data point. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system` | Recommended |
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `process.cpu.state` | string | The CPU state for this data point. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system` | Recommended |

`process.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
| -------- | ----------- |
| `system` | system |
| `user` | user |
| `wait` | wait |
| Value | Description |
|---|---|
| `system` | system |
| `user` | user |
| `wait` | wait |
<!-- endsemconv -->

### Metric: `process.cpu.utilization`

<!-- semconv metric.process.cpu.utilization(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| ------------------------- | --------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `process.cpu.utilization` | Gauge | `1` | Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. |
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.cpu.utilization` | Gauge | `1` | Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. |
<!-- endsemconv -->

<!-- semconv metric.process.cpu.utilization(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
| ------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------- |
| `process.cpu.state` | string | The CPU state for this data point. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system` | Recommended |
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `process.cpu.state` | string | The CPU state for this data point. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system` | Recommended |

`process.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
| -------- | ----------- |
| `system` | system |
| `user` | user |
| `wait` | wait |
| Value | Description |
|---|---|
| `system` | system |
| `user` | user |
| `wait` | wait |
<!-- endsemconv -->

### Metric: `process.memory.usage`

<!-- semconv metric.process.memory.usage(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| ---------------------- | --------------- | ----------- | ------------------------------------- |
| `process.memory.usage` | UpDownCounter | `By` | The amount of physical memory in use. |
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.memory.usage` | UpDownCounter | `By` | The amount of physical memory in use. |
<!-- endsemconv -->

<!-- semconv metric.process.memory.usage(full) -->
Expand All @@ -94,9 +94,9 @@ metrics](/docs/runtime/README.md#metrics).
### Metric: `process.memory.virtual`

<!-- semconv metric.process.memory.virtual(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| ------------------------ | --------------- | ----------- | --------------------------------------- |
| `process.memory.virtual` | UpDownCounter | `By` | The amount of committed virtual memory. |
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.memory.virtual` | UpDownCounter | `By` | The amount of committed virtual memory. |
<!-- endsemconv -->

<!-- semconv metric.process.memory.virtual(full) -->
Expand All @@ -105,107 +105,107 @@ metrics](/docs/runtime/README.md#metrics).
### Metric: `process.disk.io`

<!-- semconv metric.process.disk.io(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| ----------------- | --------------- | ----------- | ----------------------- |
| `process.disk.io` | Counter | `By` | Disk bytes transferred. |
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.disk.io` | Counter | `By` | Disk bytes transferred. |
<!-- endsemconv -->

<!-- semconv metric.process.disk.io(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
| ---------------------------------------- | ------ | ------------------------------------------------------- | -------- | ----------------- |
| `process.disk.process.disk.io.direction` | string | The direction of the data transfer for this data point. | `read` | Recommended |
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `process.disk.process.disk.io_direction` | string | The direction of the data transfer for this data point. | `read` | Recommended |

`process.disk.process.disk.io.direction` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.
`process.disk.process.disk.io_direction` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
| ------- | ----------- |
| `read` | read |
| `write` | write |
| Value | Description |
|---|---|
| `read` | read |
| `write` | write |
<!-- endsemconv -->

### Metric: `process.network.io`

<!-- semconv metric.process.network.io(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------------------- | --------------- | ----------- | -------------------------- |
| `process.network.io` | Counter | `By` | Network bytes transferred. |
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.network.io` | Counter | `By` | Network bytes transferred. |
<!-- endsemconv -->

<!-- semconv metric.process.network.io(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
| ------------------------------ | ------ | ------------------------------------------------------- | --------- | ----------------- |
| `process.network.io.direction` | string | The direction of the data transfer for this data point. | `receive` | Recommended |
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `process.network.io_direction` | string | The direction of the data transfer for this data point. | `receive` | Recommended |

`process.network.io.direction` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.
`process.network.io_direction` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
| ---------- | ----------- |
| `receive` | receive |
| `transmit` | transmit |
| Value | Description |
|---|---|
| `receive` | receive |
| `transmit` | transmit |
<!-- endsemconv -->

### Metric: `process.threads`
### Metric: `process.thread.count`

<!-- semconv metric.process.threads(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| ----------------- | --------------- | ----------- | ---------------------- |
| `process.threads` | UpDownCounter | `{thread}` | Process threads count. |
<!-- semconv metric.process.thread.count(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.thread.count` | UpDownCounter | `{thread}` | Process threads count. |
<!-- endsemconv -->

<!-- semconv metric.process.threads(full) -->
<!-- semconv metric.process.thread.count(full) -->
<!-- endsemconv -->

### Metric: `process.open_file_descriptors`
### Metric: `process.open_file_descriptor.count`

<!-- semconv metric.process.open_file_descriptors(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| ------------------------------- | --------------- | ----------- | ------------------------------------------------- |
| `process.open_file_descriptors` | UpDownCounter | `{count}` | Number of file descriptors in use by the process. |
<!-- semconv metric.process.open_file_descriptor.count(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.open_file_descriptors` | UpDownCounter | `{count}` | Number of file descriptors in use by the process. |
<!-- endsemconv -->

<!-- semconv metric.process.open_file_descriptors(full) -->
<!-- semconv metric.process.open_file_descriptor.count(full) -->
<!-- endsemconv -->

### Metric: `process.context_switches`

<!-- semconv metric.process.context_switches(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------------------------- | --------------- | ----------- | ------------------------------------------------------ |
| `process.context_switches` | Counter | `{count}` | Number of times the process has been context switched. |
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.context_switches` | Counter | `{count}` | Number of times the process has been context switched. |
<!-- endsemconv -->

<!-- semconv metric.process.context_switches(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
| ------------------------------- | ------ | ----------------------------------------------------------------------------------------- | ----------- | ----------------- |
| `process.context_switches.type` | string | Specifies whether the context switches for this data point were voluntary or involuntary. | `voluntary` | Recommended |
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `process.context_switch_type` | string | Specifies whether the context switches for this data point were voluntary or involuntary. | `voluntary` | Recommended |

`process.context_switches.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.
`process.context_switch_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
| ------------- | ----------- |
| `voluntary` | voluntary |
| Value | Description |
|---|---|
| `voluntary` | voluntary |
| `involuntary` | involuntary |
<!-- endsemconv -->

### Metric: `process.paging.faults`

<!-- semconv metric.process.paging.faults(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| ----------------------- | --------------- | ----------- | ------------------------------------------- |
| `process.paging.faults` | Counter | `{fault}` | Number of page faults the process has made. |
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `process.paging.faults` | Counter | `{fault}` | Number of page faults the process has made. |
<!-- endsemconv -->

<!-- semconv metric.process.paging.faults(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
| ---------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------- |
| `process.paging.faults.type` | string | The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. | `major` | Recommended |
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `process.paging.fault_type` | string | The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. | `major` | Recommended |

`process.paging.faults.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.
`process.paging.fault_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
| ------- | ----------- |
| `major` | major |
| `minor` | minor |
| Value | Description |
|---|---|
| `major` | major |
| `minor` | minor |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md
Loading

0 comments on commit e10cc9a

Please sign in to comment.