Skip to content

Commit

Permalink
Add semantic conventions for process metrics (open-telemetry#2061)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaglowski authored Jan 25, 2022
1 parent 2e514e1 commit a167e51
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ release.
([#2210](https://github.com/open-telemetry/opentelemetry-specification/pull/2210))
- Use UCUM units in Metrics Semantic Conventions.
([#2199](https://github.com/open-telemetry/opentelemetry-specification/pull/2199))
- Add semantic conventions for process metrics.
[#2032](https://github.com/open-telemetry/opentelemetry-specification/pull/2061)
- Changed default Prometheus Exporter host from `0.0.0.0` to `localhost`.
([#2282](https://github.com/open-telemetry/opentelemetry-specification/pull/2282))

Expand Down
6 changes: 4 additions & 2 deletions specification/metrics/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ for the total amount of memory on a system.
amount of memory in a each state. Where appropriate, the sum of **usage**
over all attribute values SHOULD be equal to the **limit**.

A measure of the amount of an unlimited resource consumed is differentiated
from **usage**.
A measure of the amount consumed of an unlimited resource, or of a resource
whose limit is unknowable, is differentiated from **usage**. For example, the
maximum possible amount of virtual memory that a process may consume may
fluctuate over time and is not typically known.

- **utilization** - an instrument that measures the *fraction* of **usage**
out of its **limit** should be called `entity.utilization`. For example,
Expand Down
17 changes: 16 additions & 1 deletion specification/metrics/semantic_conventions/process-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,24 @@ metrics](runtime-environment-metrics.md).
<!-- toc -->

- [Metric Instruments](#metric-instruments)
* [Process](#process)
- [Attributes](#attributes)

<!-- tocstop -->

## Metric Instruments

TODO
### Process

Below is a table of Process metric instruments.

| Name | Instrument | Units | Description | Labels |
|------|------------|-------|-------------|--------|
| `process.cpu.time` | Asynchronous Counter | s | Total CPU seconds broken down by different states. | `state`, if specified, SHOULD be one of: `system`, `user`, `wait`. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. |
| `process.memory.usage` | Asynchronous UpDownCounter | By | The amount of physical memory in use. | |
| `process.memory.virtual` | Asynchronous UpDownCounter | By | The amount of committed virtual memory. | |
| `process.disk.io` | Asynchronous Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` |

## Attributes

Process metrics SHOULD be associated with a [`process`](../../resource/semantic_conventions/process.md#process) resource whose attributes provide additional context about the process.

0 comments on commit a167e51

Please sign in to comment.