diff --git a/CHANGELOG.md b/CHANGELOG.md index 52d54b298f0..b00fd8375b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/specification/metrics/semantic_conventions/README.md b/specification/metrics/semantic_conventions/README.md index 04e3de179ca..086714929e8 100644 --- a/specification/metrics/semantic_conventions/README.md +++ b/specification/metrics/semantic_conventions/README.md @@ -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, diff --git a/specification/metrics/semantic_conventions/process-metrics.md b/specification/metrics/semantic_conventions/process-metrics.md index b67ab3ff3ba..6524a88f992 100644 --- a/specification/metrics/semantic_conventions/process-metrics.md +++ b/specification/metrics/semantic_conventions/process-metrics.md @@ -16,9 +16,24 @@ metrics](runtime-environment-metrics.md). - [Metric Instruments](#metric-instruments) + * [Process](#process) +- [Attributes](#attributes) ## 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.